now taking the names lengths into account

This commit is contained in:
Louis Vallat 2019-11-10 13:31:43 +01:00
parent 8bd3c81237
commit 7bd7ba8f5f

View File

@ -47,12 +47,16 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty(trim($_POST["first_name"]))) {
$first_name_err = "Please input your first name.";
} else if (strlen(trim($_POST["first_name"])) > 255){
$first_name_err = "Too long.";
} else {
$first_name = trim($_POST["first_name"]);
}
if (empty(trim($_POST["last_name"]))) {
$last_name_err = "Please input your last name.";
} else if (strlen(trim($_POST["last_name"])) > 255){
$last_name_err = "Too long.";
} else {
$last_name = trim($_POST["last_name"]);
}