GOOGLE
<?php
session_start();
//Include the database configuration file
include 'dbcon.php';
if(isset($_POST['paasordedit'])){
extract($_POST);
$pass=mysql_query("SELECT * FROM `registration` WHERE `password`='".md5($_POST['oldpass'])."' AND `id`='".$_SESSION['user_id']."'");
$rowss=mysql_fetch_array($pass);
$rowss['password'];
if($rowss['password']!=md5($_POST['oldpass'])){?>
<script>
alert("Old Password not Match");
window.location.href='profile.php';
</script>
<?php echo $rowss['password']; }else{
if($newpass==$cpass){ ?>
<?php
echo $update = mysql_query("UPDATE `registration` SET `password`='".md5($_POST['newpass'])."',`pasword_hint`='".$_POST['newpass']."' WHERE `id`='".$_SESSION['user_id']."'");
if($update){
?>
<script>
alert("Password changed Successfuly");
window.location.href='profile.php';
</script>
<?php
}
}
}
}
?>
Copyright © 1945 -