-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathW_confirm.php
More file actions
26 lines (25 loc) · 802 Bytes
/
Copy pathW_confirm.php
File metadata and controls
26 lines (25 loc) · 802 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
<?php
session_start();
include_once "W_config.php";
if(isset($_POST['signin'])) {
$uname = $_POST['uname'];
$upassword = $_POST['upassword'];
if ($uname == "pawan" and $upassword == "pawan") {
header("location:W_vehicle.php");
}
else {
$query = "select * from user where username = '$uname' && password = '$upassword';";
$result = mysqli_query($connect, $query);
$count = mysqli_num_rows($result);
if($count == true) {
$_SESSION['uname'] = $uname;
$_SESSION['logintime'] = time();
header("location:W_userlogin.php");
}
else {
echo "Invalid User";
header("location:main.php");
}
}
}
?>