<?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: PHP Form Validation</title>
	<atom:link href="http://www.htmlcenter.com/blog/php-form-validation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.htmlcenter.com/blog/php-form-validation/</link>
	<description>Web Development Help and Tutorials</description>
	<lastBuildDate>Sun, 05 Feb 2012 17:25:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Martin</title>
		<link>http://www.htmlcenter.com/blog/php-form-validation/#comment-23400</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Tue, 05 Apr 2011 08:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://htmlcenter.com/?p=238#comment-23400</guid>
		<description>My code is giving an error message:

&lt;code&gt;( ! ) Parse error: syntax error, unexpected T_STRING in C:\wamp\www\hontangawizi.net\error.php on line 41&lt;/code&gt;

Could someone tell me what the heck is wrong. 

&lt;pre&gt;&lt;code&gt;&lt;?php
extract($_POST);
/* Validation */

function check_field1($field_name_2)
{
  if(!preg_match(&quot;/[^a-zA-Z0-9\.\-\Ä\ä\Ö\ö\Ü\ü\
  ]+$/s”,$field_name_1))
  return TRUE;
  else
  return FALSE;
}

function check_field3($field_name_2)
{
  if(!preg_match(“/[^0-9\ ]+$/”,$field_name_2))
  return TRUE;
  else
  return FALSE;
}

/* Validation */

$error=0; // check up variable

/* get it checking */

if(!check_field1($your_name))
{
  echo “Illegal input $your_name in ‘your_name’”;
  $error++; // $error=$error+1;
}
if(!check_field2($your_phone))
{
  echo “Illegal input $your_phone in ‘your_phone’”;
  $error++;
}

if($error == 0)
{
  echo
  ”
  The data you entred was correct, thank you!
  Your data:
  Your name: $your_name
  Your phone: $your_phone

  “;
}else{
  echo “Number of errors: $error”;
}

?&gt;&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>My code is giving an error message:</p>
<p><code>( ! ) Parse error: syntax error, unexpected T_STRING in C:\wamp\www\hontangawizi.net\error.php on line 41</code></p>
<p>Could someone tell me what the heck is wrong. </p>
<pre><code>&lt;?php
extract($_POST);
/* Validation */

function check_field1($field_name_2)
{
  if(!preg_match(&quot;/[^a-zA-Z0-9\.\-\Ä\ä\Ö\ö\Ü\ü\
  ]+$/s”,$field_name_1))
  return TRUE;
  else
  return FALSE;
}

function check_field3($field_name_2)
{
  if(!preg_match(“/[^0-9\ ]+$/”,$field_name_2))
  return TRUE;
  else
  return FALSE;
}

/* Validation */

$error=0; // check up variable

/* get it checking */

if(!check_field1($your_name))
{
  echo “Illegal input $your_name in ‘your_name’”;
  $error++; // $error=$error+1;
}
if(!check_field2($your_phone))
{
  echo “Illegal input $your_phone in ‘your_phone’”;
  $error++;
}

if($error == 0)
{
  echo
  ”
  The data you entred was correct, thank you!
  Your data:
  Your name: $your_name
  Your phone: $your_phone

  “;
}else{
  echo “Number of errors: $error”;
}

?&gt;</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtiss</title>
		<link>http://www.htmlcenter.com/blog/php-form-validation/#comment-16004</link>
		<dc:creator>Curtiss</dc:creator>
		<pubDate>Wed, 03 Nov 2010 15:23:57 +0000</pubDate>
		<guid isPermaLink="false">http://htmlcenter.com/?p=238#comment-16004</guid>
		<description>That type of error usually means that a closing curly bracket (}) is missing somewhere at the end of one of your loops or if...else statements.</description>
		<content:encoded><![CDATA[<p>That type of error usually means that a closing curly bracket (}) is missing somewhere at the end of one of your loops or if&#8230;else statements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ans</title>
		<link>http://www.htmlcenter.com/blog/php-form-validation/#comment-15995</link>
		<dc:creator>ans</dc:creator>
		<pubDate>Wed, 03 Nov 2010 07:19:22 +0000</pubDate>
		<guid isPermaLink="false">http://htmlcenter.com/?p=238#comment-15995</guid>
		<description>hey i am gettin a 
Parse error: syntax error, unexpected $end in C:\xampp\htdocs\validate\error.php on line 67

error which is at the end of the page~!!!!

Plz help</description>
		<content:encoded><![CDATA[<p>hey i am gettin a<br />
Parse error: syntax error, unexpected $end in C:\xampp\htdocs\validate\error.php on line 67</p>
<p>error which is at the end of the page~!!!!</p>
<p>Plz help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jimmy_tsatsos</title>
		<link>http://www.htmlcenter.com/blog/php-form-validation/#comment-15754</link>
		<dc:creator>jimmy_tsatsos</dc:creator>
		<pubDate>Sat, 23 Oct 2010 02:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://htmlcenter.com/?p=238#comment-15754</guid>
		<description>Hi! My question is how can I use validation with Greek characters (Greek alphabet)?

for example instead of &quot;^[a-z .&#039;-]+$&quot; I would like &quot;^[α-ω .&#039;-]+$&quot; or &quot;^[Α-Ω .&#039;-]+$&quot;</description>
		<content:encoded><![CDATA[<p>Hi! My question is how can I use validation with Greek characters (Greek alphabet)?</p>
<p>for example instead of &#8220;^[a-z .'-]+$&#8221; I would like &#8220;^[α-ω .'-]+$&#8221; or &#8220;^[Α-Ω .'-]+$&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.htmlcenter.com/blog/php-form-validation/#comment-14994</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Tue, 21 Sep 2010 07:26:34 +0000</pubDate>
		<guid isPermaLink="false">http://htmlcenter.com/?p=238#comment-14994</guid>
		<description>usually I use validation functionality described by Vitana here http://vitana-group.com/article/php/validation because it I can easy extend it. thanks vitana for help</description>
		<content:encoded><![CDATA[<p>usually I use validation functionality described by Vitana here <a href="http://vitana-group.com/article/php/validation" rel="nofollow">http://vitana-group.com/article/php/validation</a> because it I can easy extend it. thanks vitana for help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajeev</title>
		<link>http://www.htmlcenter.com/blog/php-form-validation/#comment-13897</link>
		<dc:creator>Rajeev</dc:creator>
		<pubDate>Thu, 29 Jul 2010 06:27:19 +0000</pubDate>
		<guid isPermaLink="false">http://htmlcenter.com/?p=238#comment-13897</guid>
		<description>Hii 

acutally on executing above i got parsing error as:
 &quot;Parse error: parse error in C:\wamp\www\Folder\error.php on line 65&quot;

Please give a solution of it. i have checked the code. i have not found the problem.. 
I will look forward for your response..

have a nice day.!!</description>
		<content:encoded><![CDATA[<p>Hii </p>
<p>acutally on executing above i got parsing error as:<br />
 &#8220;Parse error: parse error in C:\wamp\www\Folder\error.php on line 65&#8243;</p>
<p>Please give a solution of it. i have checked the code. i have not found the problem..<br />
I will look forward for your response..</p>
<p>have a nice day.!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trician</title>
		<link>http://www.htmlcenter.com/blog/php-form-validation/#comment-13873</link>
		<dc:creator>Trician</dc:creator>
		<pubDate>Wed, 28 Jul 2010 08:22:02 +0000</pubDate>
		<guid isPermaLink="false">http://htmlcenter.com/?p=238#comment-13873</guid>
		<description>can you please help me? i have a problem. i want to validate numbers. i dont want any letter inputted. example:
contact number: hello
(CANNOT INPUT LETTERS! ONLY NUMBERS!)

thnk you</description>
		<content:encoded><![CDATA[<p>can you please help me? i have a problem. i want to validate numbers. i dont want any letter inputted. example:<br />
contact number: hello<br />
(CANNOT INPUT LETTERS! ONLY NUMBERS!)</p>
<p>thnk you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ebenezer A. Mghase</title>
		<link>http://www.htmlcenter.com/blog/php-form-validation/#comment-9078</link>
		<dc:creator>Ebenezer A. Mghase</dc:creator>
		<pubDate>Tue, 30 Jun 2009 17:50:21 +0000</pubDate>
		<guid isPermaLink="false">http://htmlcenter.com/?p=238#comment-9078</guid>
		<description>What are the ways I can use to retain the data submitted via the form when the validation fails?</description>
		<content:encoded><![CDATA[<p>What are the ways I can use to retain the data submitted via the form when the validation fails?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PG</title>
		<link>http://www.htmlcenter.com/blog/php-form-validation/#comment-7649</link>
		<dc:creator>PG</dc:creator>
		<pubDate>Sun, 18 Jan 2009 19:07:10 +0000</pubDate>
		<guid isPermaLink="false">http://htmlcenter.com/?p=238#comment-7649</guid>
		<description>Dude, it&#039;s &quot;hyphen&quot;, not &quot;hiven&quot;!</description>
		<content:encoded><![CDATA[<p>Dude, it&#8217;s &#8220;hyphen&#8221;, not &#8220;hiven&#8221;!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: naresh</title>
		<link>http://www.htmlcenter.com/blog/php-form-validation/#comment-7421</link>
		<dc:creator>naresh</dc:creator>
		<pubDate>Sat, 15 Nov 2008 06:25:28 +0000</pubDate>
		<guid isPermaLink="false">http://htmlcenter.com/?p=238#comment-7421</guid>
		<description>Hi

i need coding for form validation in php server side,no field should be blank from user side,i do not need it of java script only pure php form validation

my code is as under



Regesrtation Form





  
     Name:
    
      *(Maxlength 50)
  
  
    Address
    
    
  
  
    Email:
    
      *(Maxlength 100)
  
  
    Gender:
    
      Male
      
      Female
  
  
    Upload Photo
    
  
  
    Hobby
    cricket&#160;
	football&#160;
	rugby&#160;
	other
     
  
  
    State
    
        
        Gujarat
        Maharashtra
        MP
      
  
  
    City
    
        ahmedabad
        patan
        surendranagar
        ahmedabad
        patan
        surendranagar
        ahmedabad
        patan
        surendranagar
        ahmedabad
        patan
        surendranagar
        ahmedabad
        patan
        surendranagar
      
    
  
  
    User name
    
  
  
    Password
    
  
  
    confirm password
    
  
  
      
    
  

</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>i need coding for form validation in php server side,no field should be blank from user side,i do not need it of java script only pure php form validation</p>
<p>my code is as under</p>
<p>Regesrtation Form</p>
<p>     Name:</p>
<p>      *(Maxlength 50)</p>
<p>    Address</p>
<p>    Email:</p>
<p>      *(Maxlength 100)</p>
<p>    Gender:</p>
<p>      Male</p>
<p>      Female</p>
<p>    Upload Photo</p>
<p>    Hobby<br />
    cricket&nbsp;<br />
	football&nbsp;<br />
	rugby&nbsp;<br />
	other</p>
<p>    State</p>
<p>        Gujarat<br />
        Maharashtra<br />
        MP</p>
<p>    City</p>
<p>        ahmedabad<br />
        patan<br />
        surendranagar<br />
        ahmedabad<br />
        patan<br />
        surendranagar<br />
        ahmedabad<br />
        patan<br />
        surendranagar<br />
        ahmedabad<br />
        patan<br />
        surendranagar<br />
        ahmedabad<br />
        patan<br />
        surendranagar</p>
<p>    User name</p>
<p>    Password</p>
<p>    confirm password</p>
]]></content:encoded>
	</item>
</channel>
</rss>

