Not sure I would get stuck on two actions (which implies two forms on a
page, perfectly legal, but you need to use JavaScript and hidden fields if
the two forms need to submit the same data elements).

You might find an easier approach would be to place two submit buttons on
the same form (with one action) and have that routine recognize which submit
button was pressed, either by looking at the name

if(is_set($_POST["buttonname"]))  xxxxx

or the value (also uses as button text)

if($_POST["go"] == "1st button")  xxxx
elseif($_POST["go"] == "2nd button") xxxx

In this example both buttons have the same name.

hope this gives you a few more options.

Warren Vail 

-----Original Message-----
From: Dimitri Marshall [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 9:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Two Actions in a Form?


Hi there,
I realize this is a group for PHP, but this question is related.

What I want to do is have one action in a form execute if the user clicks on
one button, and another action execute if the user clicks on another button.
The actions will point to PHP programs.

Can someone fill me in on what the HTML is for this. I can't remember.

Thanks a bunch in advance,
Dimitri Marshall

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to