-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess1.php
More file actions
51 lines (40 loc) · 1.22 KB
/
Copy pathprocess1.php
File metadata and controls
51 lines (40 loc) · 1.22 KB
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
<?php
require_once ('connection.php');
if (isset($_POST['btn_save1']))
{
$UName= $_POST['Username'];
$Pass= $_POST['Password'];
$Adminname = 'admin';
if (empty($UName) || empty($Pass))
{
echo 'Please fill all the details';
}
else
{
$query = "select * from users where UName='$UName'";
$result = mysqli_query($con,$query);
if ($row =mysqli_fetch_assoc($result))
{
$db_password = $row['Password'];
if($Pass == $db_password)
{
header("location:drop-down-menu-homepage.php");
}
else
{
echo "<script>alert('Incorrect Password'); location.href='login.php';</script>";
}
if($UName == $Adminname)
{
if($Pass==$db_password)
{
header("location:admin.php");
}
}
}
else
{
echo 'Please check your query';
}
}
}