-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtrips.php
More file actions
37 lines (37 loc) · 1.53 KB
/
trips.php
File metadata and controls
37 lines (37 loc) · 1.53 KB
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
<?php
include('includes/header.php');
$sql="SELECT * FROM carsharetrips order by date DESC";
?>
<div class="container">
<?php if($result = mysqli_query($con, $sql)):?>
<?php if(mysqli_num_rows($result) > 0){
while($row = mysqli_fetch_array($result)):?>
<div class="row" align="center">
<div class="col-md-8 col-md-offset-2">
<div class="trip">
<div class="row">
<a href="viewTrip.php?id=<?php echo $row['trip_id'];?>">
<div class="col-md-8">
<p>
<span class="text-info">Départ : </span><small><?php echo $row["departure"];?></small><br>
<span class="text-info">Destination :</span><small><?php echo $row["destination"];?></small><br>
<span class="text-info">Le :</span><small><?php echo $row["date"];?> à <?php echo $row["time"];?></small>
</p>
</div>
<div class="col-md-4">
<p>
<span class="text-danger"><?php echo $row["price"].' '.'DH';?></span><br>
<span class="text-success"><?php echo $row["seatsavailable"].' '.'place(s)';?></span><br>
</p>
</div>
</a>
</div>
</div>
</div>
</div>
<?php
endwhile;
}
?>
<?php endif;?>
<?php include('includes/footer.php');?>