sweet! That site rocks.
not only did I find what I needed but a bunch of other stuff I didn't know I needed! hahahaha
you can check the link above for che check box code, but I'll put it here to:
The original java code had the number of checkboxes set but in my code I need it to change depending on the user that's online
so here is the script in the <head> of the page
$numOFchecks is the number of checkboxes the user needs
echo '<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function checkAll() {
for (var j = 1; j <= ' . $numOFchecks . '; j++) {
box = eval("document.form1.checkbox" + j);
if (box.checked == false) box.checked = true;
}
}
function uncheckAll() {
for (var j = 1; j <= ' . $numOFchecks . '; j++) {
box = eval("document.form1.checkbox" + j);
if (box.checked == true) box.checked = false;
}
}
function switchAll() {
for (var j = 1; j <= ' . $numOFchecks . '; j++) {
box = eval("document.form1.checkbox" + j);
box.checked = !box.checked;
}
}
// End -->
</script>';
then all I needed was the form tag:
<form name="form1" method="post" action="next.php">
then a php loop to create the checkboxes
$count = 1;
while ($count <= $numOFchecks){
echo '<input type="checkbox" name="checkbox' . $count . '" value="value">';
$count = $count + 1;
}
and last but not least the Yes and No radio buttons
<input name="button" type="radio" value="Yes" onClick="checkAll()">
<input name="button" type="radio" value="No" onClick="uncheckAll()">