Infinite loop display iteration database entries

I have php code,that fetch and show entries from database.I need to display them while they shuffling until something happened /pressing a button ect./

something like this-

here is my code

$winners = [];
$conn = mysqli_connect("localhost", "admin", "admin", "lottary");
$sql = "SELECT * FROM users ORDER BY RAND() ";

$result = $conn->query($sql);

while ( $row = $result->fetch_assoc()) {

    $id = $row['id'];
    $firstname = $row['first_name'];
    $lastName = $row['last_name'];
    $points = $row['point'];
    $all =$id.' '.$firstname. ' '.$lastName. ' '.$points;

    <input class="form-control" size="40" name="id" type="text" value="<?php echo $all; ?>">

<?php }


Read more here:

Content Attribution

This content was originally published by murphy_86 at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: