Hey al just to keep it short : i need to register some info for users via a register.php
so the username must have 6 chars atleast uppercase lowercase doen't matter. and i have to be able to put in a number or more where i want it so usernames can be like :
Stefano1 stefano321 32Stefano21 stefa1oS
Youknow?
here is what i already have and does not work :
if(!preg_match( "?=(?:.*?[A-Za-z]){6}", $_POST['loginName']))
{
die("Invalid name ");
die(header("Refresh: 5; URL=register.php"));
}
What about this regex: "/^[A-Za-z0-9]{6,}$/"