-
Notifications
You must be signed in to change notification settings - Fork 46
/
forgetprocess3.php
46 lines (38 loc) · 1.09 KB
/
forgetprocess3.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
if(isset($_POST['btn_up'])){
@$email = $_REQUEST['getdocemail'];
$newpass = $_POST['newpass'];
$cnfpass = $_POST['cnfpass'];
if($newpass == $cnfpass){
include('includes/conn.php');
$q = "UPDATE doctor set password='$newpass' where email='$email'";
if($r = mysqli_query($con,$q)){
echo '<script type="text/javascript">';
echo 'alert("Your password has been reset");';
echo 'window.location.href = "index.php";';
echo '</script>';
}
}else{
echo "Password Not match Go Back and type correct password";
}
}
elseif(isset($_POST['btn_pp'])){
$email = $_REQUEST['getpemail'];
$newpass = $_POST['newpass'];
$cnfpass = $_POST['cnfpass'];
if($newpass == $cnfpass){
include('includes/conn.php');
$q = "UPDATE patient set password='$newpass' where email='$email'";
if($r = mysqli_query($con,$q)){
echo '<script type="text/javascript">';
echo 'alert("Your password has been reset");';
echo 'window.location.href = "index.php";';
echo '</script>';
}
}else{
echo "Password Not match Go Back and type correct password";
}
}else{
echo "Invalid Action";
}
?>