note 127171 deleted from function.strlen by girgias
| From: | girgias@php.net | Date: | Fri, 10 Jun 2022 20:38:13 +0000 |
| Subject: | note 127171 deleted from function.strlen by girgias | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218583@lists.php.net to get a copy of this message | ||
Note Submitter: php User
----
Here is the code for a user registration:
if (empty($_POST["element_2"])) {
$passwordErr = "Passwort fehlt! ";
} else {
$password = test_input($_POST["element_2"]);
if ($user == $password) {
$passwordErr = "Passwort darf nicht Username sein! <br>";
}
if (strlen($password) < 7) {
$passwordErr .= "Mindestlänge 7 Stellen!";
}
}
And:
echo $passwordErr;