How can I get this check box to work?
the id='item' will always be the same per item no matter which I check. It always grabs the last one checked.
query
$result10 = mysql_query("SELECT * FROM todo WHERE complete='0' AND day='$today' ORDER BY whenby ASC LIMIT 3");
<form method="post" action="login-home.php" id="submittedtodo" >
<?
echo "This is the list for $todayshow </br>";
while($row6 = mysql_fetch_assoc($result10))
{
// item and when it is do by
echo "<input type='checkbox' name='item' id='item' value=\"{$row6['id']}\">
<label for=\"item\"><strong>Item:</strong> " . $row6['item'] . " (" . $row6['time'] . ") </label>";
};
while($row7 = mysql_fetch_assoc($result11))
{
// Employee Clocked In to do the Todo list
echo "
<input type=\"submit\" name=\"employeedo\" id=\"employeedo\" value=\"{$row7['employee']}\">";
}
?>
</form>
then submitted
//Todo list
if(isset($_POST['submittedtodo']))
{
$person = $_POST['employeedo'];
$item = $_POST['item'];
mysql_query("UPDATE todo SET complete = '1', whodone = '$person', whendone = NOW() WHERE id = '$item'");
};