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- http://jsfiddle.net/ZDsMa/1/

here is my code

<?php
$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 }

$conn->close();
?>


Read more here: https://stackoverflow.com/questions/65719519/infinite-loop-display-iteration-database-entries

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: