如何使用php为特定行更新mysql数据库

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?

$query = "SELECT * FROM `sessionid` WHERE `sessionid` = '$session'  ";
$result = mysql_query($query) or die(mysql_error());
echo '<table class="table"><tbody>';

while($row = mysql_fetch_assoc($result)) {
echo '<tr><td><h3>' . $row['title'] . '</h3></td><td>' . $row['options'] . '</td><td><div class="span3 offset1"><input type="text" value="' . $row['qt'] . '" class="span1">    <h4> $' . $row['price'] . '</h4></td></tr>';
}

echo '<tr><td></td><td></td><td><a href="#" class="btn"><i class="icon refresh"></i>Refresh</a></td></tr></tbody></table>';

you have to use a FORM in your html code:

http://php.about.com/od/phpbasics/ss/mysql_files.htm