From ea5cbf6d5c87c1696aa2a085da2e5fc1b69acc20 Mon Sep 17 00:00:00 2001 From: Zhihao Lin Date: Thu, 14 Nov 2019 09:07:35 -0500 Subject: [PATCH] #77 change password update --- alterpassword.handle.php | 32 ++++++++++++++++ alterpassword.php | 81 ++++++++++++++++++++++++++++++++++++++++ manage.php | 29 +++++++++++++- 3 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 alterpassword.handle.php create mode 100644 alterpassword.php diff --git a/alterpassword.handle.php b/alterpassword.handle.php new file mode 100644 index 0000000..55abcc2 --- /dev/null +++ b/alterpassword.handle.php @@ -0,0 +1,32 @@ +alert('email does not exist'); window.location.href='alterpassword.php' "; + exit(); + } + + if ($oldpassword != $retpassword) { + echo ""; + exit(); + } + mysqli_query ($conn, "UPDATE $AccountTable_name SET User_password='$newpassword' WHERE User_email='$useremail'" ); + mysqli_close ( $conn ); + + header('Location: index.php'); + echo "password change successfully"; +?> diff --git a/alterpassword.php b/alterpassword.php new file mode 100644 index 0000000..d82506c --- /dev/null +++ b/alterpassword.php @@ -0,0 +1,81 @@ + + + + + +UB TRADE + + + + + +
+
+
+ +
+ +
+
+
+
+ + +
+
+
+
+ + +
+ +
+ + + + + + + diff --git a/manage.php b/manage.php index 50144eb..fda2326 100644 --- a/manage.php +++ b/manage.php @@ -15,6 +15,11 @@
    + + +