D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ipuco
/
public_html
/
superadmin
/
Filename :
update-password.php
back
Copy
<?php ob_start(); @session_start(); include('include/connection.php'); $emailid = $_POST['emailid']; //echo "<br />"; $old_password = $_POST['old_password']; //echo "<br />"; $newpassword = $_POST['newpassword']; //echo "<br />"; $confirm_newpassword = $_POST['confirm_newpassword']; //echo "<br />"; if ($_POST["newpassword"] == $_POST["confirm_newpassword"]) { $newpassword1 = md5($newpassword); //echo "UPDATE admin set password='" . $newpassword . "' WHERE emailid='" . $emailid . "'"; mysqli_query($conn, "UPDATE admin set password='" . $newpassword1 . "' WHERE emailid='" . $emailid . "'"); //echo "<br />"; $message = "Password Changed"; ?> <script type="text/javascript"> alert("Password Updated Successfully!"); window.location='logout.php'; </script> <?php //echo "<br />"; } else { $message = "Current Password is not correct"; ?> <script type="text/javascript"> alert("Password Not Updated Plz Try New Password And Confirm New Password Correct!"); window.location='dashboard.php'; </script> <?php } ?>