please i am trying to update a form , but it only updates the last row , i have tried to echo the post values sent(item[Pidno] and item[Pquantity] ) as array but it comes back with just the last row item[Pquantity] update , and it does not return the item[Pidno], where am i going wrong
<?
$pplresult = mysql_query("SELECT * FROM repplac");
echo "<table border='1'><tr><th> SHOP NAME</th><th> PRODUCT NAME</th><th>
PRODUCT SIZE</th><th> PRODUCT COLOUR</th><th> PRODUCT QUANTITY</th><th>
PRICE</th><th> </th></tr>";
while($row = mysql_fetch_assoc($pplresult)){?>
<form action='updatepplac.php' method='Post' class='slistbar'>
<?echo "<tr><td>" .$row['Sname'] ."</td><td>" .$row['Pname'] ."</td><td>" .$row['Psize'] ."</td><td>" .$row['Pcolour'] ."</td><td>" ."<input type='text' name='item[Pquantity]' id='Pquantity' value='{$row['Pquantity']}' >" ."</td><td>" .$row['Price'] ."</td><td>" ?>
<a href="deleteproduct.php?del=<?php echo $row['Pidno'];?>">delete</a></td></tr>
<input type='hidden' name='item[Pidno]' id='Pidno' value='<?php echo $row['Pidno']; ?>' ><?php }
// table closing tag
?>
the update script
$submit = $_POST['submit'];
//$rowdelete = $_GET['del'];
$nPquantity = $_POST['item'];
foreach($nPquantity as $Pquantitys){
list($pidno, $Pquantity) = $Pquantitys;
echo "$Pquantitys";
//echo "$rowdelete";
//echo "$pidno";
//echo "$Pquantity";
die();