title: How to print next row of fetched mysql data whenever button is clicked?
body: <p>Have no idea on how to update or fetch the next row of data when the button is clicked.</p>
  
  <p>I had successfully connected to the database and retrieved the data and tabulated them in the form of a result table.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;link rel="stylesheet" type="text/css" href="css/html.css"&gt;
    &lt;head&gt;
      &lt;title&gt;Welcome to my quiz! \(* 3 *)/&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;h1&gt;Welcome to my quiz&lt;/h1&gt;
    &lt;link rel="stylesheet" type="text/css" href="css/background.css"&gt;
  
      &lt;?php
  
  
           $conn = new mysqli("jdbc:mysql://localhost:3306/quizapp?useSSL=false&amp;serverTimezone=UTC", "myuser", "1234");
  
           $result=mysqli_query($conn,"SELECT id, question, optionA, optionB, optionC, optionD FROM question");
  
           $count=0;
  
          if($row=mysqli_fetch_array($result))
            {
              echo $row['id']. ". " . $row['question'];
              echo "&lt;br&gt;";
              echo "&lt;br&gt;";
              echo "A. ".$row['optionA'];
              echo "&lt;br&gt;";
              echo "&lt;br&gt;";
              echo "B. ".$row['optionB'];
              echo "&lt;br&gt;";
              echo "&lt;br&gt;";
              echo "C. ".$row['optionC'];
              echo "&lt;br&gt;";
              echo "&lt;br&gt;";
              echo "D. ".$row['optionD'];
              echo "&lt;br&gt;";
              echo "&lt;br&gt;";
            }
  
  
      ?&gt;   
  
   &lt;form&gt; &lt;input type="button" value="Next" onclick="alert('You clicked the button!')"&gt; &lt;/form&gt;
  
  
  
  
    &lt;/body&gt;
  &lt;/html&gt;  
  </code></pre>
  
  <p>In what way I can code it so that I can proceed to the next row of data ( next question with option A, B, C, D ) when the button is clicked?</p>