<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Validating POST fields the easy way</title>
	<atom:link href="http://www.codediesel.com/php/validating-post-fields-the-easy-way/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codediesel.com/php/validating-post-fields-the-easy-way/</link>
	<description>/* PHP &#38; MySQL Journal */</description>
	<lastBuildDate>Fri, 27 Jan 2012 16:39:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Tarasov</title>
		<link>http://www.codediesel.com/php/validating-post-fields-the-easy-way/comment-page-1/#comment-1127</link>
		<dc:creator>Tarasov</dc:creator>
		<pubDate>Tue, 17 Mar 2009 08:03:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=142#comment-1127</guid>
		<description>Hey... Do you really think it could be safety?
What if I edit HTML source and send it to server? just using mozilla firebug extension - its the easiest way.

I think all data must be validate on a server side.</description>
		<content:encoded><![CDATA[<p>Hey&#8230; Do you really think it could be safety?<br />
What if I edit HTML source and send it to server? just using mozilla firebug extension &#8211; its the easiest way.</p>
<p>I think all data must be validate on a server side.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mère Teresa</title>
		<link>http://www.codediesel.com/php/validating-post-fields-the-easy-way/comment-page-1/#comment-1032</link>
		<dc:creator>Mère Teresa</dc:creator>
		<pubDate>Tue, 16 Dec 2008 12:46:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=142#comment-1032</guid>
		<description>Why do not use Filter extension ?

http://fr.php.net/manual/fr/function.filter-input-array.php</description>
		<content:encoded><![CDATA[<p>Why do not use Filter extension ?</p>
<p><a href="http://fr.php.net/manual/fr/function.filter-input-array.php" rel="nofollow">http://fr.php.net/manual/fr/function.filter-input-array.php</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.codediesel.com/php/validating-post-fields-the-easy-way/comment-page-1/#comment-1031</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Tue, 16 Dec 2008 09:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=142#comment-1031</guid>
		<description>Sorry you comment system hates me... :(



$regs[&#039;user_name&#039;] = &quot;^[a-zA-Z][a-zA-Z]*$&quot;;
$regs[&#039;user_fname&#039;] = &quot;^[a-zA-Z][a-zA-Z]*$&quot;;
...
...



foreach( $regs as $k =&gt; $v )
{
   if( ! ereg( $v , $_POST[$k] ) )
   {
       $errors[$k] = &quot;INVALID...&quot;;
   }
}</description>
		<content:encoded><![CDATA[<p>Sorry you comment system hates me&#8230; <img src='http://www.codediesel.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>$regs['user_name'] = &#8220;^[a-zA-Z][a-zA-Z]*$&#8221;;<br />
$regs['user_fname'] = &#8220;^[a-zA-Z][a-zA-Z]*$&#8221;;<br />
&#8230;<br />
&#8230;</p>
<p>foreach( $regs as $k =&gt; $v )<br />
{<br />
   if( ! ereg( $v , $_POST[$k] ) )<br />
   {<br />
       $errors[$k] = &#8220;INVALID&#8230;&#8221;;<br />
   }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.codediesel.com/php/validating-post-fields-the-easy-way/comment-page-1/#comment-1030</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Tue, 16 Dec 2008 09:34:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=142#comment-1030</guid>
		<description>I think in this area, there oh... about 7368 different ways.

Typically, I go for this model:

 $v )
{
   if( ! ereg( $v , $_POST[$k] ) )
   {
       $errors[$k] = &quot;INVALID...&quot;;
   }
}

?&gt;</description>
		<content:encoded><![CDATA[<p>I think in this area, there oh&#8230; about 7368 different ways.</p>
<p>Typically, I go for this model:</p>
<p> $v )<br />
{<br />
   if( ! ereg( $v , $_POST[$k] ) )<br />
   {<br />
       $errors[$k] = &#8220;INVALID&#8230;&#8221;;<br />
   }<br />
}</p>
<p>?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Woods</title>
		<link>http://www.codediesel.com/php/validating-post-fields-the-easy-way/comment-page-1/#comment-1029</link>
		<dc:creator>Justin Woods</dc:creator>
		<pubDate>Tue, 16 Dec 2008 00:09:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=142#comment-1029</guid>
		<description>Hmmm... My HTML got removed...

Here&#039;s another try:

&gt; type=&quot;text&quot; name=&quot;c[first_name]&quot; / &lt;
&gt; type=&quot;text&quot; name=&quot;c[last_name]&quot; / &lt;</description>
		<content:encoded><![CDATA[<p>Hmmm&#8230; My HTML got removed&#8230;</p>
<p>Here&#8217;s another try:</p>
<p>&gt; type=&#8221;text&#8221; name=&#8221;c[first_name]&#8221; / &lt;<br />
&gt; type=&#8221;text&#8221; name=&#8221;c[last_name]&#8221; / &lt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Woods</title>
		<link>http://www.codediesel.com/php/validating-post-fields-the-easy-way/comment-page-1/#comment-1028</link>
		<dc:creator>Justin Woods</dc:creator>
		<pubDate>Tue, 16 Dec 2008 00:08:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.codediesel.com/?p=142#comment-1028</guid>
		<description>Hey there. Why not use PHP&#039;s built-in ability to automaticaly create arrays from submitted data?

HTML:



PHP:

$form_data = $_POST[&#039;c&#039;];


Using an array, there&#039;s no need to loop through your submitted data to find fields with a prefix.</description>
		<content:encoded><![CDATA[<p>Hey there. Why not use PHP&#8217;s built-in ability to automaticaly create arrays from submitted data?</p>
<p>HTML:</p>
<p>PHP:</p>
<p>$form_data = $_POST['c'];</p>
<p>Using an array, there&#8217;s no need to loop through your submitted data to find fields with a prefix.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

