Form verification in php = = and = = =
Do you have the appearance of = = = can pass, = = Instead, the situation is wrong?
if (Empty ($password) | | empty ($cpassword)) {
Die ("No password submitted");
}
ElseIf ((strlen ($password) <5) | | (Strlen ($password) >15)) {
Die ("Invalid Password length address");
}
ElseIf (! ( strlen (password) = = (strlen (Cpassword)))) {
Die ("Passwords does not match!!!");
}
ElseIf (! ( password) = = = (Cpassword)) {
Die ("Passwords does not match!");
}
else{
for ($i =0; $i < strlen ($password); $i + +) {
echo "*";
}
}
?>
Why my password in the = = error when judging, delete this judgment, but can pass?
Share to:
------Solution--------------------
ElseIf (! ( password) = = = (Cpassword)) {
$ what???
------Solution--------------------
Reference:
elseif (! ( password) = = = (Cpassword)) {
$ what???
Good eyesight!