i just try like this.
for($i=0;$i<$length;i++)
{
if(!ctype_alpha($password[$i])
{
header("location:regist.php?err=Password not contain letter");
}
else if(!is_numeric($password[$i]))
{
header("location:regist.php?err=Password not contain numbers");
}
else
{
//??
}
}
how to validate password if the password must alphanumeric without using regular expression ?