diff --git a/www/register.php b/www/register.php index c3f5f3e..6c1745b 100644 --- a/www/register.php +++ b/www/register.php @@ -6,7 +6,7 @@ $email_check = md5($_POST['email']); include './lib/get_races.php'; //contains list of races, and checks if the email has already is present in DB foreach($races as $race){ $race_blob[$race['ID']] = $race['NAME']; -} +} $failed_fields = []; $failed_input = False; if(isset($_POST['fname']) && strlen($_POST['fname']) > 0 && strlen($_POST['fname']) < 20){ $fname = $_POST['fname'];} else { @@ -14,7 +14,7 @@ if(isset($_POST['fname']) && strlen($_POST['fname']) > 0 && strlen($_POST['fname $failed_input = True; if(strlen($_POST['fname']) > 20){ array_push($failed_fields,"Nějak je dlouhé, to jméno"); - } + } else { array_push($failed_fields,"Jméno chybí"); } @@ -27,7 +27,7 @@ if(isset($_POST['lname']) && strlen($_POST['lname']) > 0 && strlen($_POST['lname } else{ array_push($failed_fields,"Příjmení chybí"); } - + } if(isset($_POST['email']) && strlen($_POST['email']) > 0 && strlen($_POST['email']) < 50){ $email = $_POST['email'];} else { //header("Location: http://$base_url/?write_success=false&reason=Bez_mailu_to_nepude"); @@ -51,7 +51,7 @@ if(isset($_POST['nick']) && strlen($_POST['nick']) > 0 && strlen($_POST['nick']) //header("Location: http://$base_url/?write_success=false&reason=Nejak_se_jemnovat_musite"); $failed_input = True; if(strlen($_POST['nick']) > 20) { - array_push($failed_fields,"Tak takhle dlouhej název Tímu se na řidítka nevleze"); + array_push($failed_fields,"Tak takhle dlouhej název Tímu se na řidítka nevleze"); }else { array_push($failed_fields,"Nick, nebo název Tímu chybí"); } @@ -83,9 +83,9 @@ if(isset($_POST['confirm'])){