|
Posted by Tony Marston on 03/30/06 23:04
The solution is to post to the same form which then stores its data in the
$_SESSION array before passing control to the actual form identified on one
of the submit buttons. The next form, which could be one of several, simply
picks up its data from the $_SESSION array instead of the POST array. This
can be done with standard PHP code without the need for any fancy and
dubious tricks with javascript.
It's not rocket science, just lateral thinking.
--
Tony Marston
http://www.tonymarston.net
"Andy Jeffries" <news@andyjeffries.co.uk> wrote in message
news:pan.2006.03.30.19.11.17.743469@andyjeffries.co.uk...
> On Thu, 30 Mar 2006 20:00:37 +0100, Tony Marston wrote:
>> I don't see what the problem is. It is possible to have more than one
>> submit button on any form, with each one having a unique name instead of
>> 'submit'. So if you have a form with 'buttonA', 'buttonB' and 'buttonC'
>> when the user presses one of those buttons that will be the ONLY one to
>> appear in the POST array. I have been using this technique for years, so
>> don't tell me that it doesn't work.
>
> Congratulations...now tell me, did you actually read the post you're
> responding to?
>
> He didn't ask about having multiple submit buttons but about having
> multiple form actions (target scripts) depending on which button is
> pressed.
>
> Re-read and try again...
>
> Regards,
>
>
> Andy
>
>
> --
> Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
> http://www.gphpedit.org | PHP editor for Gnome 2
> http://www.andyjeffries.co.uk | Personal site and photos
>
[Back to original message]
|