File "manage-users.php"
Full Path: /home/quiczmwg/lightspringdigitals.com/admin-20260114051102/img/manage-users.php
File size: 3.73 KB
MIME-type: text/x-php
Charset: utf-8
<?php
// session_start();
include 'head.php';
include 'header.php';
?>
<body class="skin-default fixed-layout">
<div id="main-wrapper">
<?php
include 'sidebar.php';
// Modify the SQL query to order by a column (e.g., registration date)
$sql = "SELECT * FROM user_login ORDER BY created_at ASC";
$result = $conn->query($sql);
?>
<div class="page-wrapper">
<section>
<div class="">
<?php
include 'nav1.php';
?>
<div class="container-fluid">
<div class="card">
<div class="card-header">
<?php echo isset($_SESSION['mgs'])?$_SESSION['mgs']:""?>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table">
<thead>
<th>#</th>
<th>UserID</th>
<th>Fullname</th>
<th>Email</th>
<th>Profit Balance</th>
<th>Account Balance</th>
<th>----</th>
</thead><br>
<tbody>
<?php
// Check if there are any rows returned by the query
if($result !== false && $result->num_rows > 0){
$num = 1;
// Fetch each row from the result set
while($row = $result->fetch_assoc()){
?>
<tr>
<td><?php echo $num++; ?></td>
<td><?php echo $row['userid']; ?></td>
<td><?php echo $row['full_name']; ?></td>
<td><?php echo $row['email']; ?></td>
<td>$<?php echo number_format($row['profit_balance'], 2); ?></td>
<td>$<?php echo number_format($row['account_balance'], 2); ?></td>
<td>
<a href="info.php" class="btn btn-info btn-sm">Details</a>
</td>
</tr>
<?php
}
} else {
// Handle case where no rows are returned
echo "<tr><td colspan='6'>No users found.</td></tr>";
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
<?php include 'footer.php'; ?>
</body>
</html>