guys really need your help here.! im working on multiple update using checkbox. since i was using only 1 checkbox before it works fine. but i need 2 values (from checkbox, because if not, array wont give me the value im looking for..) for my query on the next page.
here's the code i got. but it doesn't work when it comes to looping (records from db).
i'll work with hiding the checkbox later.
<?php
if($_POST['submit']!="")
{
echo "che_list: ".$_POST['che_list'];
echo "check_list: ".$_POST['check_list'];
}
?>
<?php include "dbconn.php";?>
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
<!-- Begin
function Check(chk)
{
if(document.myform.Check_ctr.checked==true)
{
for (i = 0; i < chk.length; i++)
chk[i].checked = true ;
}
else
{
for (i = 0; i < chk.length; i++)
chk[i].checked = false ;
}
}
// End -->
</script>
</head>
<body>
<form name="myform" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<table>
<tr>
<td><input type="checkbox" name="Check_ctr" value="yes" onClick="Check(document.myform)"/></td>
<td><input type="checkbox" name="che_list" value="1">ASP</td>
<td><input type="checkbox" name="check_list" value="2">PHP</td>
</tr>
<tr>
<td><input type="submit" name="submit" value="Submit"/></td>
</tr>
</table>
</form>
</body>
</html>
pls help. its the only thing i cant do on my module.
thanx a lot.