<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/-bootstrap.min.css">
<script src="js/-jquery.min.js"></script>
<script src="js-/bootstrap.min.js"></script>
<style>
* {
box-sizing: border-box;
}
.row::after {
content: "";
clear: both;
display: table;
}
#customers {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#customers td, #customers th {
border: 1px solid #ddd;
padding: 8px;
}
#customers tr:nth-child(even){background-color: #f2f2f2;}
#customers tr:hover {background-color: #ddd;}
#customers th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;
}
</style>
</head>
<body>
<br>
<?php
$conn = new mysqli("", "root", "", "contact");
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
<?php
$users= $_GET['users'];
$query = mysqli_query($conn,"SELECT
COUNT(*) AS total_records,
contact_users.ActualLocation,
contact_users.fullname,
contact_users.username
FROM contact
INNER JOIN contact_users ON contact.users = contact_users.username
WHERE (contact.users =$users)
") or die ("Query failed:".mysqli_error($conn));
while ($row = mysqli_fetch_array($query)) {
?>
<table id="customers">
<thead>
<tr>
<th width="37">Users</th>
<th width="140">Name</th>
<th width="125">Location</th>
<th width="99">Total</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $row['username'] . ''; ?></td>
<td>
<?php echo $row['fullname'] . ''; ?></td>
<td><?php echo $row['ActualLocation'] . ''; ?></td>
<td><?php echo $row ['total_records'] . ''; ?></td>
</tr>
<?php }; ?>
</tbody>
</table>
</body>
</html>
0 comments:
Post a Comment