Hi, i was wondering if some1 could tell me the code to validate an email for incorrect charactors.
I believe it is something like this but i am not to sure
also how can i check for certain fields to be field in. i.e my form has 4 text fields ($name,$message,$email,$contact number)PHP Code:if (ereg('^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$', $address))
return true;
else
return false;
}
i want name,message and email to be filled in but contact number is optional. i cant figure out how to exclude contact number
Thanks Adam


Reply With Quote
