I've been having trouble trying to build a script that would allow me to check and uncheck certain checkboxes within a form.
echo "<FORM name=m3 METHOD=POST ACTION=blahdrv.php>";
if($vteamid == 5 or $vteamid == 2) {
echo "<b>Team 3</b><br><br>";
echo "<input type=button value=UnCheck onClick=this.value=check1(document.all.m3)><br><br>";
$result = mysql_query("SELECT name FROM client WHERE teamid = 5 ORDER BY name ASC");
while ($query_data = mysql_fetch_row($result)) {
echo "<input CHECKED type=checkbox name=\"$query_data[0]\" value=\"$query_data[0]\" >$query_data[0]<br>";
}
This is my code that generates a column of checkboxes. I use the same code with minor changes to generate the other columns as well. I have 6 columns that need to be able to quickly check and uncheck but I'm having no luck. Here's a screenshot attatched if it helps any...
Any help would be appreciated. I know there are better ways to write the code but I'm mainly interested in getting it running first.
So if you know how to submit multiple forms through one submit button or know a better way to check/uncheck a column of checkboxes in the same form, please help.