dear all,
i am facing a problem. actually i wanna get user validation with the following code, I want to insert only [a-z0-9_] character in user login....when i insert username like this 'asdfdfad' it returns else part ( special characters are not allowed ). please solve it ..... thanks
if ( preg_match ('/^[a-z0-9]$/', $username)) {
echo $username. ' ' . $password . ' ' . $email;
}
else {
echo 'special characters are not allowed';
}