-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvisitHistory.php
59 lines (45 loc) · 1.66 KB
/
visitHistory.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
<?php include("session.php") ?>
<!DOCTYPE html>
<html lang="en">
<?php include("head.php"); ?>
<?php include("config.php"); ?>
<body>
<?php include("navbar.php"); ?>
<section>
<div class="container">
<div class="row text-center title-space">
<div class="col-md-12">
<h4>Your Visit History</b></h4>
</div>
</div> <!-- End Row -->
<br>
<div class ="row">
<div class = "col-md-6 offset-md-3">
<div class="property-table">
<table class="table table-striped table-sm sortable">
<thead class="thead-dark">
<tr>
<th scope="col">Name</th>
<th scope="col">Date Logged</th>
<th scope="col">Rating</th>
</tr>
</thead>
<tbody>
<?php
$result = mysqli_query($db, "SELECT * FROM Visit INNER JOIN Property ON Visit.PropertyID = Property.ID WHERE Username = '" . $_SESSION['login_user'] . "'");
while ($row = mysqli_fetch_array($result)) {?>
<tr>
<td class="link-color"><a href=<?php echo "propertyDetails.php?id=" . $row['PropertyID'] . "&date=" . $row["VisitDate"];?>><?php echo $row['Name'];?></a></td>
<td><?php echo $row['VisitDate'];?></td>
<td><?php echo $row['Rating'];?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div> <!-- End Property Table Wrapper -->
</div> <!-- End Column -->
</div> <!-- End Row -->
</div> <!-- End Container -->
</section>
</body>
</html>