con il codice sottostante riesco a fare l'update di una tabella dove uno dei campi è una checkbox, soltanto che al momento dell'aggiornamento i campi che avevo selezionato si dispongono in fila e non in corrispondenza dell'id che avevo scelto...
aiutatemi per favore!
ecco il codice:

Codice PHP:
<?php include("../../../db.php"); 

$sql="SELECT * FROM selezioneprodottielenco";
$result=mysql_query($sql);

// Count table rows
$count=mysql_num_rows($result);

// Check if button name "Submit" is active, do this
$IdSelezioni $_POST['IdSelezioni'];
$Richiesto $_POST['Richiesto'];
$IdListino $_POST['IdListino'];
$Provincia2 $_POST['Provincia2'];
$Submit $_POST['Submit'];
if(
$Submit){
for(
$i=0;$i<$count;$i++){
$sql1="UPDATE selezioneprodottielenco SET Richiesto='$Richiesto[$i]' WHERE 
IdSelezioni='
$IdSelezioni[$i]'";
$result1=mysql_query($sql1);
}
}

if(
$result1){
header("location:selezionaprodotti.php");
}
mysql_close();
?>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1">

<form action="" method="post" enctype="multipart/form-data" name="form1">

<input type="hidden" value="" name="Richiesto[]" id="Richiesto"><tr>

<td>
<table width="500" border="0" cellspacing="1" cellpadding="0">



<tr>
<td align="center">[b]Id[/b]</td>
<td align="center">[b]CA[/b]</td>
<td align="center">[b]SS[/b]</td>
<td align="center">[b]NU[/b]</td>
</tr>
<?php
while($rows=mysql_fetch_array($result)){
?>
<tr>
<td align="center"><input name="IdSelezioni[]" type="text" id="IdSelezioni" value="<?php 
echo $rows['IdSelezioni']; ?>">
  </td>
<td align="center"><input name="IdProdotto[]" type="text" id="IdProdotto" value="<?php 
echo $rows['IdProdotto']; ?>"></td>
<td align="center"><input name="IdCategoria[]" type="text" id="IdCategoria" value="<?php 
echo $rows['IdCategoria']; ?>"></td>
<td align="center"><input name="Richiesto[]" type="checkbox" id="Richiesto" <? echo 
'value="1" '; if($rows['Richiesto'] == "1"){echo 'checked';} ?> /></td>

</tr>
<?php 
}
?>
<tr>
<td colspan="4" align="center"><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</td>
</tr>
</form>
</table>