Forum Moderators: coopster
Can somebody please guide me where am I wrong?
extract($_POST);// **** Validation for name */
if(!check_name($POST_['name'])){
echo "Illegal input name";
$error++; }
else
$userName = $POST_['name'] ;
} // end of process check
function check_name($name)
{
$pattern = "/^[-A-Za-z]+$/";
if (! preg_match($pattern, $name) ) {
return false; }
else
return true;
}
Thanks
>> exract($_POST)
Not used here therefore it's not needed.