-
Notifications
You must be signed in to change notification settings - Fork 0
/
process2.php
38 lines (36 loc) · 1.07 KB
/
process2.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
<?php
require_once('connection.php');
if(isset($_POST['btn-login']))
{
$UName=$_POST['username'];
$Pass=$_POST['password'];
if(empty($UName) || empty($Pass))
{
echo 'please fill in 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(md5($Pass)==$db_password)
{
echo "hello ";
echo stripslashes($row['Uname']);
echo"<br/>your birthday is on ";
echo htmlspecialchars(stripslashes($row['DOB']));
}
else
{
echo 'incorrect password';
}
}
else
{
echo 'please check your query';
}
}
}
?>