Hey, I have created a contact us form which works nicely with my site, however I have some backup PHP validation code, which all works apart from the last name section, how can I set it up to it checks to see if there is a first name and a last, maybe even another name? This is what I have so far and it only works if you put in a first name and nothing else:
$string_exp = "/^[A-Za-z.'-]+\$/";
if(!preg_match($string_exp, $name)) {
$error_message .= 'The Name you entered does not appear to be valid.<br/>';
}
Thank you