-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathverifyd.php
50 lines (41 loc) · 984 Bytes
/
verifyd.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
41
42
43
44
45
46
47
48
49
50
<?php
session_start();
$con=mysqli_connect("localhost","root","","transportation");
if(!$con){
die("cannot coonect");
}
$uphone=$_POST['phone'];
$pass=$_POST['password'];
if($uphone==''|| $pass=='')
{
header("Location:login.php?id=Some fields are empty");
}
$qry=mysqli_query($con,"SELECT * FROM driver WHERE Dphone='$uphone';");
if(!$qry)
{
die("Query Failed: ");
}
else
{
$row=mysqli_fetch_array($qry);
if($uphone==$row['Dphone'])
{
if($uphone==$row['Dphone'] && $pass==$row['Dpassword'])
{
header("Location: welcomed.php?id=$uphone");
$_SESSION['id']=$uphone ;
$pone = $_SESSION['id'];
//echo $email;
}
else
{
header("Location:wrongpass.php?id=username already taken or your password is incorrect. Please try again");
}
}
else
{
header("Location: notwelcome.php?id=$uphone");
}
}
mysqli_close($con);
?>