title: How do I update mysql database using php for a specific row
body: <p>I am going through certain rows in a table and am pulling multiple attributes for each product stored.  One such item is quantity.  The value for qt is pulled from the table and displayed in a textbox.  The user should be able to change the quantity (from 1 to 2 for example) and the database should update for just that product chosen.  Given I have the code below, how can I put together this functionality?</p>
  
  <pre><code>$query = "SELECT * FROM `sessionid` WHERE `sessionid` = '$session'  ";
  $result = mysql_query($query) or die(mysql_error());
  echo '&lt;table class="table"&gt;&lt;tbody&gt;';
  
  while($row = mysql_fetch_assoc($result)) {
  echo '&lt;tr&gt;&lt;td&gt;&lt;h3&gt;' . $row['title'] . '&lt;/h3&gt;&lt;/td&gt;&lt;td&gt;' . $row['options'] . '&lt;/td&gt;&lt;td&gt;&lt;div class="span3 offset1"&gt;&lt;input type="text" value="' . $row['qt'] . '" class="span1"&gt;    &lt;h4&gt; $' . $row['price'] . '&lt;/h4&gt;&lt;/td&gt;&lt;/tr&gt;';
  }
  
  echo '&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="#" class="btn"&gt;&lt;i class="icon refresh"&gt;&lt;/i&gt;Refresh&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;';
  </code></pre>