title: Update a field in output php query from mysql in a table
body: <p>I've been around this for hours now and I don't know where to turn.</p>
  
  <p>I want to update a field in output PHP query from mysql in a table.</p>
  
  <p>All I need is a little button or something like that to insert "Yes" to a field in that record.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>&lt;body&gt;
  &lt;?php
  $connection = mysql_connect('localhost', 'root', ''); //The Blank string is the password
  mysql_select_db('test');
  
  mysql_set_charset('utf8');
  
  $query = "SELECT * FROM simulac";
  $result = mysql_query($query);
  
  echo "&lt;table&gt;"; // start a table tag in the HTML
  
  while($row = mysql_fetch_array($result)){   //Creates a loop to loop through results
  echo "&lt;tr&gt;&lt;td&gt;" . $row['id'] . "&lt;/td&gt;&lt;td&gt;" . $row['name'] . "&lt;/td&gt;&lt;td&gt;" . $row['over'] . "&lt;/td&gt;&lt;td&gt;&lt;form action="" method="POST"&gt;&lt;input type="submit" value="Concluido" name="submit" class="enviar" /&gt;&lt;/form&gt;&lt;/td&gt;&lt;/tr&gt;";  }
  
  echo "&lt;/table&gt;"; //Close the table in HTML
  
  mysql_close(); //Make sure to close out the database connection
  
  ?&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>I just stopped here because it started to get me errors and I wonder if there is a better way of doing this.. </p>