Jump to content

lewis1682

New Members
  • Posts

    1
  • Joined

  • Last visited

lewis1682's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.