Ok, I've been playing with this for hours. I can't seem to make it work. I've tried several things.
Here is the basic idea. I want to make sure the name contains letters (a-zA-Z) and numbers 0-9. I don't want them to be able to use any special characters characters at all.
$accept = '[a-zA-Z0-9]';
if(!preg_match($accept, $value)
{
echo 'Alpha number characters required.';
$error=true;
}
else $error = false;
it was working. but now for some reason it's busted.