-
Notifications
You must be signed in to change notification settings - Fork 0
/
history.php
73 lines (61 loc) · 1.89 KB
/
history.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
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" >
<link type="text/css" rel="stylesheet" href="style.css" /></link>
<style>
table{
background-color:#e7feff;
margin:100px;
}
td{
padding:0.2em;
}
</style>
</head>
<body class="history">
<div class="navbar navbar" style="font:20px;">.
<div class="container">
<a href="#" class="navbar-brand" style="font-size:30px;"> The Sparks Bank</a>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="./index.html"><span class="glyphicon glyphicon-home "></span> HOME</a></li>
<li><a href="./transfer.html"><span class="glyphicon glyphicon-send "></span> Transfer Money</a></li>
<li><a href="./users.php"><span class="glyphicon glyphicon-user"></span> Customers</a></li>
</ul>
</div>
</div>
</div>
<div>
<?php
echo "<div>".
"<table border=\"border-width:1px;\"margin=\"50px;\" id=\"history_table;\">".
"<tr>".
"<th>To_Name</th>".
"<th>From_Name</th>".
"<th>Amount</th>".
"<th>Transfer Time</th>".
"</tr>".
"<tbody id=\"tbdy\">";
$con=mysqli_connect("localhost","root","","banking_system") or die(mysqli_error($con));
if(!$con)
{
die("Connection Failed:".mysqli_connect_error);
}
$sel_query="SELECT To_Name,From_Name,Amount,Trtime from history";
$sel_res=$con->query($sel_query);
if($sel_res->num_rows>0)
while($row=$sel_res->fetch_assoc())
{
echo "<tr>";
echo "<td>". $row["To_Name"]."</td>"."<td>".$row["From_Name"]."</td>"."<td>".$row["Amount"]."</td>"."<td>".$row["Trtime"]."</td>";
echo "</tr>";
}
echo " ".
"</tbody>".
"</table>".
"</div>";
mysqli_close($con);
?>
</div>
</body>
</html>