----- Original Message -----
From: "Doug Coning" <[EMAIL PROTECTED]>
To: "php-general" <[EMAIL PROTECTED]>
Sent: Monday, December 30, 2002 3:26 PM
Subject: [PHP] Multiple forms
> Hi all,
>
> I have an update page that has a form in it.
>
> However, I want to add another form in the same page. My current form
acts
> upon itself (i.e. Action = the same page). If I set up another form to do
> the same, how would my PHP determine with action submit button was acted
> upon?
>
> Currently, for the single form here is how it knows a form was submitted:
>
> if ((isset($HTTP_POST_VARS["MM_update"])) && ($HTTP_POST_VARS["MM_update"]
> == "form1")) {
>
> How would I test which form submitted the action?
>
> Thanks and if I didn't make myself clear, I apologize.
>
> Doug
>
Hi Doug,
I handle it like this (I think):
Then, to process your form:
<?
if ($_POST[option] == "") {
// the form code should go here
}
else if ($_POST[option] == "form1") {
print "This will parse form1";
}
else if ($_POST[option] == "form2") {
print "This will parse form2";
}
?>
I haven't done this in a while though, so this may not work for you.
Good luck,
Tyler
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php