registration form checking order in php?

yyahmee

New Member
i have a problem with this registration form, im checking the password and username, this is the process im doing it in?php:\[code\]$username = mysql_real_escape_string($_POST['username']); $password = md5(mysql_real_escape_string($_POST['pass'])); //check if username is valid if (ereg("^[a-zA-Z0-9_\-]+$", $username)){ die(msg(0,"oOps, This username is not valid, only numbers, letters and underscores allowed")); } // check if password is more than 6 if(strlen($password) < 6){ die(msg(0,"oOps, The password has to be more than 6 characters, be tricky!")); }\[/code\]but i type the user, password correctly, but its still giving me the errors shown, is thier something wrong with the checking :)) thanks
 
Back
Top