-
Notifications
You must be signed in to change notification settings - Fork 2
/
admin_login_backend.php
60 lines (33 loc) · 1.18 KB
/
admin_login_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['login']))
{
$adharno = $_POST['aadhar'];
$password =$_POST['password'];
}
$s1 = "select PASSWORD from MANAGER_LOGIN where SHOP_ADMIN = '$adharno'";
$q1 = mysqli_query($con,$s1);
if(mysqli_num_rows($q1)>0)
{
$w = mysqli_fetch_assoc($q1);
if(password_verify($password,$w['PASSWORD']))
{
$s2 = "select NAME from SHOP_MANAGER where SHOP_ADMIN='$adharno'";
$q2 = mysqli_query($con,$s2);
$name=mysqli_fetch_assoc($q2);
if(empty($_SESSION))
session_start();
$_SESSION['admin_aadhar']=$adharno;
$_SESSION['admin_name'] = $name['NAME'];
header("location:admin_home.php");
}
else
{
echo "password wrong";
}
}
else
{
echo "Invalide Aadharno or yet not registered";
}
?>