D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
home
/
shubmkcj
/
urbane.createerp.com
/
Filename :
update-user-password.php
back
Copy
<?php ob_start(); session_start(); include 'config.php'; $email = $_POST['email']; $old_password = $_POST['old_password']; $new_password = $_POST['new_password']; $passql = "SELECT * FROM `login_admin` where email='$email' and password = '$old_password' "; $result = mysqli_query($conn,$passql); $count = mysqli_num_rows($result); if($count == 1){ $sql = "UPDATE `login_admin` SET `password`='$new_password' WHERE password = '$old_password' and email='$email'"; if ($conn->query($sql) === TRUE) { $_SESSION['change'] = "change" ; echo '<script>location.replace("user-change-password.php")</script>'; } else { echo "Error: " . $sql . "<br>" . $conn->error; } }else{ echo '<script>alert("No Data Found !")</script>'; } ?>