-
Notifications
You must be signed in to change notification settings - Fork 0
/
transferHistory.php
54 lines (46 loc) · 1.51 KB
/
transferHistory.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
<?php
session_start();
include('db_connect.php');
$sql = 'SELECT * FROM transfer_history ORDER BY t_id';
// get the result set (set of rows)
$result = mysqli_query($conn, $sql);
// fetch the resulting rows as an array
$history = mysqli_fetch_all($result, MYSQLI_ASSOC);
// free the $result from memory (good practise)
mysqli_free_result($result);
// close connection
mysqli_close($conn);
?>
<!DOCTYPE html>
<html>
<head>
<title>Transfer History | Banking System</title>
<link rel="stylesheet" href="css1.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<?php include('navbar2.php'); ?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<section>
<div class="wrapper">
<form action="selectSender.php" method="POST">
<div class="container" style="margin: 70px auto">
<table class="highlight center">
<tr>
<th>Sender</th>
<th></th>
<th>Receiver</th>
<th>Transfer Amount</th>
<th>Transfer Time</th>
</tr>
<?php
foreach($history as $hist) {
echo "<tr><td> ".$hist['t_sender']."</td><td>→</td><td>".$hist['t_receiver']."</td><td>".$hist['t_amount']."</td><td>".$hist['t_time']."</td></tr>";
}
?>
</table>
</div>
</section>
<?php include('footer.php'); ?>
</body>
</html>