-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusercheck.php
More file actions
36 lines (33 loc) · 758 Bytes
/
Copy pathusercheck.php
File metadata and controls
36 lines (33 loc) · 758 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
<html>
<head>
</head>
<?php
if(isset($_POST['SignIn']))
{
session_start();
include "db.php";
$a=trim($_POST["uid"]);
$b=trim($_POST["pid"]);
$x="select * from user where username='$a' and BINARY password='$b'";
$y=$conn->query($x);
if($y->num_rows==1)
{
$row = $y->fetch_assoc();
$_SESSION["uid"] = $row["username"];
$_SESSION["pwd"]=$row["password"];
echo "<script type='text/javascript'>window.location.href='usermenu.php';</script>";
exit();
}
else
{
echo "<script type='text/javascript'>alert('Wrong Username or Password!!!');</script>";
include "userlog.php";
}
$conn->close();
}
else
echo "<script type='text/javascript'>window.top.location.href='unauthorised.php';</script>";
?>
<body>
</body>
</html>