Hello out there!
Problems, problems...
I have one form with 3 checkboxes, but I need 2 submit buttons, that each direct to a different page. What I want is that the values of the CHECKED checkboxes are passed on to a next page. The page for the first button is view.php, which gives the user a view of the CHECKED fields in the database. The second page should be csv.php, on which the user can transport the CHECKED checkboxes to a csv file.
What I thought of was to see which of the two buttons the user has pushed, by using $HTTP_POST_VARS["button"], but I get two empty variables for the two submit - buttons....
My code:
<FORM method=post name=myform target="middle" action=middle.php?>
<input type="checkbox" name="c1" <? if($c1!="true" || $showall=="1"){echo"CHECKED";}?>> Aanhef<BR>
<input type="checkbox" name="c2" <? if($c2!="true" || $showall=="1"){echo"CHECKED";}?>> Naam<BR>
<input type="checkbox" name="c3" <? if($c3!="true" || $showall=="1"){echo"CHECKED";}?>> Functie<BR>
<input type="image" name="button" value="start" src="../pics/start.gif" alt="Weergeven">
<input type="image" name="button" value="go" src="../pics/go.gif" alt="Transporteren">
</FORM>
So, the question is, how can I check in middle.php which button was pushed, and redirect to the correct page, also passing al the needed variables (i.e. CHECKED checkboxes)??
Joyce