<<you can use onClick event to submit your form values.
<form name="f1" method="post" action="second.php3">
<input type="checkbox" name="C1" value="ON" onSelected="document.f1.submit();">
</form>
mfkoo,
i supposed to write onClick event in that check box.
That should be:
<input type="checkbox" name="C1" value="ON" onClick="document.f1.submit();">
###########-############--##########
i will explain you now how you can do this with next buttons.
i am giving the file name test.php3 for your script.
when you run this test.php3 it should display first set of check boxes.after that you can track this information using next buttons.
test.php3
<?
if($action1=="next"){
//when user clicks on first next button then
echo "<form method="post" action="test.php3"n";
echo "<input type="hidden" name="c1" value="$c1">n";
//get the values from first set of check box
into hidden text boxes for further processing.
echo "<input type="hidden" name="c2" value="$c2">n";
echo "<input type="hidden" name="c3" value="$c3">n";
echo "<input type="hidden" name="c4" value="$c4">n";
echo "<input type="hidden" name="c5" value="$c5">n";
// now show him second set of check box
echo "Check Box 6: <input type="text" name="c6">n";
echo "Check Box 7: <input type="text" name="c7">n";
echo "Check Box 8: <input type="text" name="c8">n";
echo "Check Box 9: <input type="text" name="c9">n";
echo "Check Box 10: <input type="text" name="c10">n";
echo "<input type="submit" name="action2" value="Next" >n";
echo "</form>n";
}
elseif ($action2=="next"){
//do same thing as above hide all the check box values and show the next set of check boxes.
}
elseif ($action3=="next"){
..........
}
elseif ($submit=="Submit"){
///save your record... here
}
else{
//Show him first set of check here
echo "<form method="post" action="test.php3"n";
echo "Check Box 1: <input type="text" name="c1">n";
echo "Check Box 2: <input type="text" name="c2">n";
echo "Check Box 3: <input type="text" name="c3">n";
echo "Check Box 4: <input type="text" name="c4">n";
echo "Check Box 5: <input type="text" name="c5">n";
echo "<input type="submit" name="action1" value="Next" >n";
echo "</form>n";
}
i don't know whether this logic is clear to you or not..
tell me ,if you have any problem doing this..
------------------
SR -
shiju.dreamcenter.net
"The fear of the LORD is the beginning of knowledge..."