-
Notifications
You must be signed in to change notification settings - Fork 0
/
driverdetails.php
83 lines (74 loc) · 2.44 KB
/
driverdetails.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html>
<head>
<title>Bus Booking Website</title>
<link href="vehicledetails.css" rel="stylesheet" type="text/css">
</head>
<body>
<header>
<div class="row">
<div class="logo">
<img src="bus1.jpeg">
</div>
<ul class="main-nav">
<li class="active"><a> HOME</a></li>
<li><a> SERVICES</a></li>
<li><a> ABOUT US</a></li>
<li><a> CONTACT US</a></li>
</ul>
</div>
<div class="hero">
<h1><i>Bus Booking Management</i></h1>
</div>
<ul class="sub-nav">
<li><a href="search.html">Tickets</a>
<ul>
<li><a href="">Book tickets</a></li>
<li><a href="">Cancel tickets</a></li>
<li><a href="">View ticket</a></li>
</ul>
</li>
<li><a href="vehicledetails.php">Vehicle</a>
<ul>
<li><a href="">Add Vehicle</a></li>
<li><a href="">Remove Vehicle</a></li>
<li><a href="">Vehicle Details</a></li>
</ul>
</li>
<li><a href="">Driver details</a></li>
<li><a href="passengerdetails.php">Passenger details</a></li>
</ul>
<table>
<tr>
<th>Driver Name</th>
<th>Mobile Number</th>
<th>Bus Type</th>
<th>Bus Number</th>
</tr>
<?php
$user='root';
$server='localhost';
$pass='';
$noconnect='did not connect';
$dbname='bus';
$conn= new mysqli($server,$user,$pass,$dbname);
$sql="SELECT * FROM driver_details D,bus_details B WHERE D.did=B.did; ";
$result= mysqli_query($conn,$sql);
$resultcheck= mysqli_num_rows($result);
if($resultcheck>0)
{
while($row=mysqli_fetch_assoc($result))
{
echo "<tr><td>". $row["dname"]."</td><td>". $row["dmobile"]."</td><td>". $row["bustype"]."</td><td>". $row["bp_no"]."</td></tr>";
}
echo"</table>";
}
else
{
echo "0 result";
}
?>
</table>
</header>
</body>
</html>