Hi there all,
When users sign up for my web page, I only allow their usernames to contain letters and numbers (no spaces)..however, I want them to be able to have underscores (_) as well. How can I modify my eregi statement to allow underscores as well?
if(!eregi("^[a-z0-9]+$",$user)) //check if username is valid, numbers and letters only, if not redirect and give error code 3
{
header('Location: register.php?code=3');
exit;
}
Thanks in advance.
-influx