Hi,
i am creating a form from a while loop thier is also checkbox involved in all records. other fields i am receiving okey but the checkbox creating problem if there are ten record and i submit the form whith 3 checkbox checked i get other fields 10 records but but checkbox give me only three records in array and this is wrong i need 10 records to update exacet fields..
as while loop is
while($row=mysql_fetch_array($result))
{
?>
<tr>
<td align="left" class="bodytext">
<?=$row['name'];?>
</td>
<td align="left" class="bodytext"> <input type="text" size="10" name="projected[]" value="<?=$row['projected'];?>">
</td>
<td align="left" class="bodytext"><input type="checkbox" name="active[]" value="Yes" ></td>
<td align="left" class="bodytext"><a onClick="cofirmdelet('<?=$row["code"]?>','delete','<?=$row["name"];?>')" ><img src="../images/delete.gif" name="Image22" width="80" height="13" border="0"></a>
<input type="hidden" name="scode[]" value="<?=$row['code'];?>"></td>
</tr>
<? }?>
and the receiving script is....
$projected=$REQUEST["projected"];
$ceiling=$REQUEST["ceiling"];
$scode=$REQUEST["scode"];
$active=$REQUEST["active"];
print_r($active);
print_r($projected);
//print"<br>";
//count($scode);
for ($i=0;$i<count($scode);$i++)
{
//if ($projected[$i] != "" or $projected[$i] != NULL)
//{
$sql3="UPDATE slspmast_bud SET projected='".$projected[$i]."',active='".$active[$i]."' where code=".$scode[$i]."";
echo $sql3."<br>";
$result3=mysql_query($sql3) or die("Could not update the projected and cieling");
//}
}
is their a way i get all record in array for checkbox if they are checked or not....