I am new in PHP Programming , Please Help me.
I have made a data table, then i have connected this table after that I have made a table in my index.php file . but i am facing problem to show data from data table in my index.php file, can you help me to solve this problem?
<?php include "db.php"; ?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<title>Post Global Variable</title>
</head>
<body>
<div class="row p-5">
<table class="table table-dark">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">User Name</th>
<th scope="col">Email Address</th>
<th scope="col">Password</th>
<th scope="col">Phone</th>
<th scope="col">Join Date</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
<?php
$myQuery = "SELECT * FROM users";
$allUsers = mysqli_query ($db, $myQuery);
while ($row = mysqli_fetch_assoc($allUsers)){
$id= $row['id'];
$name= $row['name'];
$userName= $row['userName'];
$email= $row['email'];
$password= $row['password'];
$phone= $row['phone'];
$join_date= $row['join_date'];
?>
<tr>
<th scope="row"><?php echo $id; ?></th>
<td><?php echo $name; ?></td>
<td><?php echo $userName; ?></td>
<td><?php echo $email; ?></td>
<td><?php echo $password; ?></td>
<td><?php echo $phone; ?></td>
<td><?php echo $join_date; ?></td>
<td><a class="btn btn-success btn-sm" href="#" role="button">Update</a>
<a class="btn btn-danger btn-sm" href="#" role="button">Delete</a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/
[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>