X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=includes%2Fformlogin.php;h=bbda789d6a8c7b15411b181fd659a4819fbf7676;hb=HEAD;hp=73cdff0e2f1ed3e899364925902ee1a08cdad50a;hpb=a96fefe119b8c91c2f5ae6ad04e11af676e5540b;p=Project_webapp.git diff --git a/includes/formlogin.php b/includes/formlogin.php index 73cdff0..bbda789 100644 --- a/includes/formlogin.php +++ b/includes/formlogin.php @@ -4,6 +4,7 @@ $form_password = filter_input(INPUT_POST, "password", FILTER_SANITIZE_STRING); if (!$form_email) { echo "The email is not valid.
"; + redirect("index.php?page=login", 3); } elseif (isset($form_email) && isset($form_password)) { if (chk_account($form_email)) { if (chk_password($form_email, $form_password)) { @@ -15,7 +16,7 @@ if (!$form_email) { echo "You're successfully authenticated.
"; redirect("index.php", 3); } else { - echo "Your password is incorrect for the account email" . $form_email . ".
"; + echo "Your password is incorrect for the account email " . $form_email . ".
"; echo "Retour"; } } else { @@ -24,7 +25,9 @@ if (!$form_email) { redirect("index.php?page=register", 3); } } else { - // didn't authenticate, go back to login form - echo "Fail to authenticate.
"; + // didn't authenticate for unknown reason, go back to login form + echo "Fail to authenticate for unknown reason.
"; redirect("index.php?page=login", 3); } + +?>