forked from RohitKaushal7/BoringStuffs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauth.php
More file actions
49 lines (30 loc) · 982 Bytes
/
auth.php
File metadata and controls
49 lines (30 loc) · 982 Bytes
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
<?php
$user = $_GET['uid'];
$pass = $_GET['pass'];
$con=mysqli_connect('localhost','root','');
mysqli_select_db($con,'hack3');
$find = "select * from users where email = '$user'";
$res = mysqli_query($con,$find);
if( mysqli_num_rows($res) == 0)
{
echo '
<div style="color: #f41; font-size: 5em; display: flex; justify-content: center;align-items: center; height: 650px; font-family: montserrat,roboto,arial;"> Not Found</div>
';
header('refresh:2; url=login.html');;
}
else
{
$row = mysqli_fetch_assoc($res);
if($pass == $row['pass'])
{
header('refresh:0.1; url=main.php?uid='.$row['id'].'&pass='.$pass);
}
else
{
echo '
<div style="color: #f41; font-size: 5em; display: flex; justify-content: center;align-items: center; height: 650px; font-family: montserrat,roboto,arial;"> Wrong Password</div>
';
header('refresh:2; url=login.html');
}
}
?>