-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisplayride.php
69 lines (61 loc) · 2.09 KB
/
displayride.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
<?php
include('connection.php');
$p = $_SESSION['email'];
$check = " select * from details where mail= '$p' ";
$res = mysqli_query($con,$check);
$s = mysqli_num_rows($res);
if($s == "0"){
echo "<script type=\"text/javascript\">\n";
echo "alert('Please Fill Your Details First.');\n";
echo "window.location = ('passenger.php');\n";
echo "</script>";
}
?>
<html>
<head>
<title>Find a Ride</title>
<link rel="stylesheet" type="text/css" href="style/table.css">
</head>
<body>
<?php include('nav.php'); ?>
<div class="table1">
<div class="text-b">Find A Ride!</div>
<table>
<thead>
<tr>
<th>E-mail</th>
<th>Date of Ride</th>
<th>Pickup</th>
<th>Dropoff</th>
<th>Vehicle</th>
<th>Available Seat</th>
<th>Time(24hr)</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
$selectquery = " select * from provider where seat>0";
$query = mysqli_query($con,$selectquery);
$nums = mysqli_num_rows($query);
while($res = mysqli_fetch_assoc($query)){
?>
<tr>
<td><?php echo $res['email']; ?> </td>
<td><?php echo $res['date']; ?> </td>
<td><?php echo $res['pickup']; ?> </td>
<td><?php echo $res['dropoff']; ?> </td>
<td><?php echo $res['vehicle']; ?> </td>
<td><?php echo $res['seat']; ?> </td>
<td><?php echo $res['time']; ?> </td>
<td><button type="submit" class="box btn"><a href="seat.php?id=<?php echo $res['p_id']; ?>">Select Ride</button></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php include('contact.php'); ?>
</body>
</html>