From 79889d64e8cc076cb2d1f434f9ed3881d8da3b43 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Sat, 13 Aug 2022 11:04:24 +0000 Subject: [PATCH] Updating password reset with AJAX --- account/login.php | 4 +- account/password-reset.php | 78 +++++++---------------- app/account/login.php | 111 ++++++++++++++++++--------------- app/account/password_reset.php | 106 +++++++++++++++++++++++++++++++ css/main.css | 5 -- css/scss/_body.scss | 8 --- 6 files changed, 192 insertions(+), 120 deletions(-) create mode 100644 app/account/password_reset.php diff --git a/account/login.php b/account/login.php index b7282d9..8d2a939 100644 --- a/account/login.php +++ b/account/login.php @@ -47,7 +47,7 @@

Login

Passwords are important to keep safe. Don't tell anyone your password, not even Fluffy!


-
+
@@ -57,7 +57,7 @@ + diff --git a/app/account/login.php b/app/account/login.php index e1f8df5..8ff01a2 100644 --- a/app/account/login.php +++ b/app/account/login.php @@ -13,6 +13,16 @@ include "../server/conn.php"; if (isset($_POST['submit'])) { + /* + |------------------------------------------------------------- + | Set error status to 0 + |------------------------------------------------------------- + | if there are more than 0 error, then they cannot submit a + | request + |------------------------------------------------------------- + */ + $error = 0; + // Checking if Username is empty if (empty(trim($_POST["username"]))) { ?> @@ -20,6 +30,7 @@ if (isset($_POST['submit'])) { sniffleAdd('Who dis?', 'You must enter a username to login!', 'var(--red)', '../assets/icons/cross.svg'); - - - - + + + + + + - - + + + + + + + + + + + +