From 8923aaacaacd65d4f6ad07acda1260c36f4d6c0a Mon Sep 17 00:00:00 2001 From: Mario <100047175+Mariopizza1@users.noreply.github.com> Date: Thu, 26 Jan 2023 18:26:38 +0200 Subject: [PATCH] more changes to register since misleading errors and disabled resubmitting the form when username is already taken and when password confirmation is wrong --- register.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/register.php b/register.php index ae7bb1f..dd098fb 100644 --- a/register.php +++ b/register.php @@ -19,6 +19,11 @@ if(isset($_POST['submit'])) { $username = $_POST['username']; $password = $_POST['pass']; $passwordconfirm = $_POST['passconfirm']; + echo ''; $user = new User($con, $user->getID($con, $username)); if ($password == $passwordconfirm) { $passwordconfirmiswrong = false; @@ -69,7 +74,7 @@ $thefunfact = json_decode($result); } else { echo "form-control form-control-sm"; } ?>" type="text" placeholder="Your username" id="inputSmall" for="inputValid" name="username"> - Password Confirmation field is invalid.'; } ?> + Username is already taken.'; } ?>