I'm using regex (I think that's what it's called - haha) to check my users' name to make sure it's valid. I want to make sure that the user doesn't have any characters. Just letters and spaces. I've got the only letters part down, but I can't get the spaces part fixed.
Here's what I'm using now..
if(preg_match("/[^a-zA-Z]/", " ", $name) != 0) {
$errorlist = $errorlist."<li>You must enter a valid First and Last name (check for invalid characters)</li>";
}
Anyone see what I'm doing wrong?