-
Notifications
You must be signed in to change notification settings - Fork 2
/
trader_forgot_password2_backend.php
60 lines (37 loc) · 1.23 KB
/
trader_forgot_password2_backend.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
$con=mysqli_connect('localhost','sickwiz','2409','SIH');
if(isset($_POST['change']))
{
$password=$_POST['password'];
$confirmpassword=$_POST['confirmpassword'];
}
if(empty($_SESSION))
session_start();
$adharno=$_SESSION['trader_aadhar'];
if($password==$confirmpassword)
{
$password1 = password_hash($password,PASSWORD_ARGON2I);
$s1 = "update TRADER set PASSWORD='$password1' where AADHAR = '$adharno'";
$q1 = mysqli_query($con,$s1);
if($q1)
{
$s2 = "select NAME from TRADER where AADHAR='$adharno'";
$q2 = mysqli_query($con,$s2);
$name=mysqli_fetch_assoc($q2);
if(empty($_SESSION))
session_start();
$_SESSION['trader_aadhar']=$adharno;
$_SESSION['trader_name'] = $name['NAME'];
header("location:trader_home.php");
echo "loginhogaya";
}
else
{
echo "error occure";
}
}
else
{
echo "both password not equal";
}
?>