<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1021885" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1021885</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-value-check#comment-1135023</link>
    <description> &lt;p&gt;i know...&lt;/p&gt;
&lt;p&gt;thanks james&lt;/p&gt;
 </description>
     <pubDate>Wed, 23 Jul 2003 23:25:39 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1135023 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-value-check#comment-1135017</link>
    <description> &lt;p&gt;You can do it with JS just as easily and never have them reload the page. Especially with CSS, you can alert them, change the field color to red, and then give them focus. JS is great for error checking up front and never leaving.&lt;/p&gt;
&lt;p&gt;PHP requires you to have the page submitted and then it would have to be alter before display again to show errors.&lt;/p&gt;
 </description>
     <pubDate>Wed, 23 Jul 2003 20:39:37 +0000</pubDate>
 <dc:creator>ShaneS</dc:creator>
 <guid isPermaLink="false">comment 1135017 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-value-check#comment-1134851</link>
    <description> &lt;p&gt;You&#039;re trying to use JS in PHP, you can&#039;t. Sadly, you can&#039;t check forms until it is submitted. So, something like this:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;form:&lt;/strong&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;form method=&amp;#039;post&amp;#039; action=&amp;#039;form.php&amp;#039;&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;#039;text&amp;#039; name=&amp;#039;single&amp;#039; value=&amp;#039;single&amp;#039;&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;#039;text&amp;#039; name=&amp;#039;child1&amp;#039; value=&amp;#039;child1&amp;#039;&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;#039;text&amp;#039; name=&amp;#039;child2&amp;#039; value=&amp;#039;child2&amp;#039;&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;#039;text&amp;#039; name=&amp;#039;child3&amp;#039; value=&amp;#039;child3&amp;#039;&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;#039;text&amp;#039; name=&amp;#039;child4&amp;#039; value=&amp;#039;child4&amp;#039;&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;#039;text&amp;#039; name=&amp;#039;child5&amp;#039; value=&amp;#039;child5&amp;#039;&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;#039;submit&amp;#039;&amp;gt;&amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Then the PHP processor:&lt;/strong&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if ((!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;trim&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;single&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]))&amp;amp;&amp;amp;(!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;trim&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;child1&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]))) {&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Location: http://.../family.html\&quot;);&lt;br /&gt;} else if ((!trim(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;single&#039;]))&amp;amp;&amp;amp;(!trim(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;child2&#039;]))) {&lt;br /&gt;&amp;nbsp; header(\&quot;Location: http://.../family.html\&quot;);&lt;br /&gt;} else if ((!trim(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;single&#039;]))&amp;amp;&amp;amp;(!trim(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;child3&#039;]))) {&lt;br /&gt;&amp;nbsp; header(\&quot;Location: http://.../family.html\&quot;);&lt;br /&gt;} else if ((!trim(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;single&#039;]))&amp;amp;&amp;amp;(!trim(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;child4&#039;]))) {&lt;br /&gt;&amp;nbsp; header(\&quot;Location: http://.../family.html\&quot;);&lt;br /&gt;} else if ((!trim(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;single&#039;]))&amp;amp;&amp;amp;(!trim(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;child5&#039;]))) {&lt;br /&gt;&amp;nbsp; header(\&quot;Location: http://.../family.html\&quot;);&lt;br /&gt;} else {&lt;br /&gt;&amp;nbsp; // Other Stuff&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I don&#039;t know what your trying to do with trim(). It doesn&#039;t return true or false, just a value without whitespace. &lt;a href=&quot;http://us3.php.net/trim&quot; class=&quot;bb-url&quot;&gt;More&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope I helped.&lt;/p&gt;
 </description>
     <pubDate>Tue, 22 Jul 2003 02:24:47 +0000</pubDate>
 <dc:creator>necrotic</dc:creator>
 <guid isPermaLink="false">comment 1134851 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
