-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck.php
40 lines (30 loc) · 771 Bytes
/
check.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
<?php
session_start();
$con = mysqli_connect('localhost','root','');
mysqli_select_db($con, 'webDev');
$email = $_POST['eml'];
$pass = $_POST['pss'];
$s = " SELECT * FROM login WHERE Email = '$email' && Password = '$pass'";
$result = mysqli_query($con, $s);
$num = mysqli_num_rows($result);
if($num == 1){
while($row = $result->fetch_assoc()) {
$name = $row["Firstname"]." ".$row["Lastname"];
$phno = $row["Phone_Number"];
}
$_SESSION['name'] = $name;
$_SESSION['phno'] = $phno;
$_SESSION['email'] = $email;
header("Location: pass.php");
}else{
header("Location: fail.php");
}
?>
<html>
<head>
<title>
Redirecting
</title>
<link rel="icon" src="avtar.png">
</head>
</html>