-
Notifications
You must be signed in to change notification settings - Fork 0
/
customers.php
38 lines (35 loc) · 1.1 KB
/
customers.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Customers</title>
<link rel="stylesheet" href="bank.css">
<link rel="stylesheet" href="customers.css">
</head>
<body>
<table id="all-cust">
<tr><th colspan="4"><h1>CITY BANK CUSTOMERS</h1></th></tr>
<tr>
<th>Name</th>
<th>Email</th>
<th>Action</th>
</tr>
<?php
$DBname = "CityBank";
$con = mysqli_connect("localhost", "root", "");
$db = mysqli_select_db($con, $DBname);
$query = "SELECT * FROM Customers";
$result = $con->query($query) or die($con->error . _LINE_);
while ($row = mysqli_fetch_assoc($result)) {
echo
"<tr>
<td>" . $row['Name'] . "</td>
<td>" . $row['Email'] . "</td>
<td><a href='customer.php?Email=$row[Email]'>View</a></td>
</tr>";
}
?>
</table>
</body>
</html>