title: While loop Mysql updating checkboxes where to start
body: <p>I have a question how can I update the database if person unchecks or check a checkbox and update the boolean field
   in mysql? For days stuck with this problem, because problem I don't know how to make a form or check if
  it is validate inside of a while loop here is my code:</p>
  
  <pre><code>&lt;?
      $result= mysql_query("SELECT * FROM cars");
      $counter = 1;
  
      while($row = mysql_fetch_array($result)) { 
          echo '&lt;tr&gt;
              &lt;td&gt;' . $counter++ . '&lt;/td&gt;
              &lt;td&gt;&lt;input type="checkbox"';  
              if ($row['show'] == true) {  
                  echo 'checked&gt;&lt;/td&gt;'; 
              } else { 
                  echo 'unchecked&gt;&lt;/td&gt;'; 
              }
              echo '&lt;td&gt;&lt;img src="../xml/'.$row['cars_id'].'-1.JPG"  width="120px"&gt;&lt;/td&gt;';        
              echo "&lt;td&gt;&lt;h3&gt; ", $row['brand']," " . $row['model'], " " . $row['type'], 
               " &amp;euro; " . $row['price'], " &lt;/h3&gt;&lt;/td&gt;";
          echo '&lt;/tr&gt;';
      }
  ?&gt;
  </code></pre>
  
  <p>p.s. I am aware of the mysql to mysqli or pdo but it is a HUGE script...</p>