<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1020765" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1020765</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ideas-form-variables-validation#comment-1127500</link>
    <description> &lt;p&gt;don&#039;t ever depend soley on javascript for validation.&lt;/p&gt;
 </description>
     <pubDate>Wed, 19 Mar 2003 05:29:35 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1127500 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ideas-form-variables-validation#comment-1127499</link>
    <description> &lt;p&gt;Not all browsers retain that information, with or without sessions, unfortunately. Especially if the form was a post result in the first place.&lt;/p&gt;
 </description>
     <pubDate>Wed, 19 Mar 2003 05:16:49 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1127499 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ideas-form-variables-validation#comment-1127486</link>
    <description> &lt;p&gt;If you&#039;re not using sessions, a simple history.back(1) will work just as fine too. However, it might not be the safest and best option but the easiest.&lt;/p&gt;
 </description>
     <pubDate>Wed, 19 Mar 2003 03:36:32 +0000</pubDate>
 <dc:creator>zollet</dc:creator>
 <guid isPermaLink="false">comment 1127486 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ideas-form-variables-validation#comment-1127485</link>
    <description> &lt;p&gt;Interesting thoughts. One of the reasons is that I am working on a form that includes about 30-40 things that have to be validated. Some are not only checking if the data has been entered but verifying ages, checking to see if a record exists, etc. so I wanted some ideas. &lt;/p&gt;
&lt;p&gt;Suzanne is right though (big suprise). A form is worthless if you have to enter all of the fields over again if you left one out.&lt;/p&gt;
 </description>
     <pubDate>Wed, 19 Mar 2003 02:38:05 +0000</pubDate>
 <dc:creator>mairving</dc:creator>
 <guid isPermaLink="false">comment 1127485 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ideas-form-variables-validation#comment-1127481</link>
    <description> &lt;p&gt;peh.&lt;/p&gt;
&lt;p&gt;JavaScript is excellent for validation. Used in combination with server-side validation and you&#039;ll catch everyone without fail. The folks who aren&#039;t paranoid (or who use sensible browsers like Camino, Safari, Netscape, Opera, Mozilla) get the ease of use and functionality, and those without get nice error messages that they can use. &lt;/p&gt;
&lt;p&gt;Poking Busy&#039;s buttons aside (&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;) I think server-side validation is a necessity, and JavaScript is a flourish. For most applications, and only when the programmer is nice enough to replace values. When I make a mistake and have to re-enter all the information I think dark thoughts about the programmer.&lt;/p&gt;
 </description>
     <pubDate>Wed, 19 Mar 2003 01:30:03 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1127481 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ideas-form-variables-validation#comment-1127472</link>
    <description> &lt;p&gt;I have a pretty good one I use for my contact forms for my sites (all PHP) displays the variables as mentioned above and also tells you which fields are missing or not valid, try it out (just leave out a requested field so I don&#039;t get your email).&lt;br /&gt;
The code isn&#039;t as pretty as Marks but if you want it I can send you it.&lt;br /&gt;
Keep away from JavaScript for validation, esp. these days with so many people turning it off to avoid pop ups etc&lt;/p&gt;
 </description>
     <pubDate>Tue, 18 Mar 2003 21:29:55 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1127472 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ideas-form-variables-validation#comment-1127461</link>
    <description> &lt;p&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: #FF8000&quot;&gt;// print common header&lt;br /&gt;&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;$submit &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;$file_url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;!=\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;\&quot;) ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // I&#039;ll stick all of my validation in the above conditional&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // so it may look like:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // &amp;amp;&amp;amp; (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file_url&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;!=\&quot;\&quot; &amp;amp;&amp;amp; is_numeric(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file_size&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) &amp;amp;&amp;amp; etc.)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // passed validation, insert record&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // haven&#039;t submitted anything yet,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // print form&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // special note, if the page was for an edit, I&#039;ll add:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$submit&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // query thingy&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_fetch_array();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extract(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$output&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= \&quot;&amp;lt;form &amp;gt;\n\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // blah blah blah&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$error&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = (!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$submit&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; || &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file_url&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;!=\&quot;\&quot;) ? \&quot;\&quot; : \&quot;You must provide a URL.&amp;lt;br&amp;gt;\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$output&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= \&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$error&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;input type=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; name=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;file_url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file_url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;gt;\n\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // blah blah blah&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$output&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= \&quot;&amp;lt;input type=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;submit&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; name=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;submit&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Create&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;gt;\n\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$output&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= \&quot;&amp;lt;input type=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;reset&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Reset&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;gt;\n\&quot;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // blah blah blah&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$output&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= \&quot;&amp;lt;/form&amp;gt;\n\&quot;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// common footer&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;I liked this method because I could print the error by each field.&lt;/p&gt;
 </description>
     <pubDate>Tue, 18 Mar 2003 18:45:08 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1127461 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ideas-form-variables-validation#comment-1127459</link>
    <description> &lt;p&gt;I would say Suzanne&#039;s server-side suggestion is probably the best way. It is how I do it anyway. Sometimes if I feel like doing a little more work I add a red-ish color to the fields that need fixing.&lt;/p&gt;
 </description>
     <pubDate>Tue, 18 Mar 2003 18:20:09 +0000</pubDate>
 <dc:creator>zollet</dc:creator>
 <guid isPermaLink="false">comment 1127459 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/ideas-form-variables-validation#comment-1127457</link>
    <description> &lt;p&gt;I use both JavaScript and server-side validation. When I write the form in the first place, I put all the values in -- &amp;lt;?=$thisfield?&amp;gt;, then when I have to do server-side validation, anything that&#039;s not right I set to blank.&lt;/p&gt;
&lt;p&gt;However, using JavaScript in combination allows you to focus fields, select field values and let people fix things right away.&lt;/p&gt;
 </description>
     <pubDate>Tue, 18 Mar 2003 17:09:37 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1127457 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
