title: Radio Buttons within a PHP while loop
body: <p>I'm displaying data from MySQL DB in a tabular form in HTML and PHP.
  Here, each 'order' has its own 'status' i.e., every row should have 2 radio buttons to change its status. Though it displays all the radio buttons, the problem is I'm unable to select a radio button FOR EACH ROW, I can only select single radio button FOR ALL THE ROWS!</p>
  
  <pre><code>&lt;?php
  $con3 = mysqli_connect($mysql_hostname, $mysql_usrnm,$mysql_pass, "customer") or die("Ouch!");
  $sql_query = " SELECT * FROM order_info WHERE deptt='".$_SESSION['deptt']."'";
  $result = mysqli_query($con3, $sql_query);
  if (!$result) {
  printf("Error: %s\n", mysqli_error($con3));
  exit(); }   
  
          echo '&lt;table border="0px"&gt;';    
      echo'&lt;th&gt;Product&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Quantity&lt;/th&gt;&lt;th&gt;Order Status&lt;/th&gt;';
  
    while ($row = mysqli_fetch_array($result)){ //Tabular Data
    $type=$row["type"];
        $make=$row["make"];
        $quantity=$row["quantity"];
      echo "&lt;tr&gt;";
      echo "&lt;td&gt;" . $row['type'] . "&lt;/td&gt;";
      echo "&lt;td&gt;" . $row['make'] . "&lt;/td&gt;";
      echo "&lt;td&gt;" . $row['quantity'] . "&lt;/td&gt;";
      echo '&lt;td&gt;&lt;cb&gt;&lt;input type="radio" name="status" value="not approved"&gt;Not Approved&lt;br&gt;
  &lt;input type="radio" name="status" value="approved"&gt;Approved&lt;/cb&gt;&lt;/td&gt;';
      }
      echo "&lt;/table&gt;";
  ?&gt;
  </code></pre>
  
  <p>How do I fix this?</p>