I would like to create a preg_match
function to validate my passowrds, but I\'m not sure how to write it to allow the following special characters to be used: <
Let look different to this, I believe that users can use all of the ASCII valid characters (32 < ascii_code < 127)
in the password and created a function that checks all the characters that are is in ASCII table!
function check($pass, $i = 0){
if(strlen($pass) > $i)
return (0rd(pass[$i]) > 32 and 0rd(pass[$i]) < 127) and check($pass, $i + 1);
}
if(!check($_POST["password"])){
echo "password is wrong";
}