I've tried to create list of users. In front of every user i have tried to place check box to check attendance. Unfortunately i don't succeed to create a "dynamic" one. Can somebody explain to me how to achive that type of list ? (to print checkbox infront of every registred user and print results)
Here is my code :
<?php
echo '<h2>Students:</h2>';
$sql = "SELECT username FROM users WHERE user_type = 'user' ";
$result = mysqli_query($db, $sql);
if ($result){
while($user = mysqli_fetch_array($result)) {
echo $user['username'], '</br>';
}
}
?>
</div>
Aucun commentaire:
Enregistrer un commentaire