D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
www
/
web
/
admin
/
Filename :
pass.php
back
Copy
<?php session_start(); if($_SESSION['user']=="") { session_destroy(); header("Location:index.php?msg=3"); } $email=$_SESSION['user']; include("connection.php"); $op_text = $_POST['op']; $salt = "softproindia2022"; $salted_pass = $op_text.$salt; $op = md5($salted_pass); //echo $op; $np_text=$_POST['np']; $salted_np=$np_text.$salt; $np = md5($salted_np); //echo $np; $cnp_text=$_POST['cnp']; $salted_cnp=$cnp_text.$salt; $cnp = md5($salted_cnp); //echo $cnp; $query="select * from tbl_admin where email='$email'"; $res=mysqli_query($dbCon,$query); if($row=mysqli_fetch_array($res)) { $pp=$row['password']; //echo $pp; } if($op==$pp) { if($op==$np) { header("Location:change.php?flg=2"); } else if($np==$cnp) { $query2="update tbl_admin set password='$cnp' where email='$email'"; mysqli_query($dbCon,$query2); session_destroy(); header("Location:index.php?msg=4"); } else { header("Location:change.php?flg=3"); } } else { header("Location:change.php?flg=1"); } ?>