Re: MULTIPLE SUBMIT BUTTONS
| From: | Dale | Date: | Sat, 10 May 2003 18:37:00 +0000 |
| Subject: | Re: MULTIPLE SUBMIT BUTTONS | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147136@lists.php.net to get a copy of this message | ||
Shawn,
All right. I am about to pull my hair out. This is the thing:
I have the button working just fine when I used the standard button:
<input type=submit name="SUBMIT1" VALUE="Save & Close">
When I, however, try to use a button that is a image:
<INPUT TYPE=IMAGE SRC="../../../IMAGES/EMPLOYEE_MNGR/BUTTON/SAVECLOSE1.GIF"
NAME="SUBMIT1" VALUE="Save and Close">
next page:
echo $_POST['SUBMIT1']; //with register_globals on would be $SUBMIT1
IT FAILS.
I don't mean to bug, but I can't for the life of me see why this doesn't
work.
Thanks,
Dale
"Dale" <DaleHersh@hotmail.com> wrote in message
news:20030510165427.82269.qmail@pb1.pair.com...
> Hi,
> I have read the section in the online manual on how to access variables
> outside of php, but I am still have problems with the current situation:
>
> I have a form that has multiple submit buttons:
>
> 1. save & close
> 2. save & new
> 3. save & redirect
> 4. save
>
> Each of these buttons will need to call the same save function, but after
> the data from the form has been saved, each button will have a unique
task.
> How do I access the name of the submit button in php. I have tried the
> following methods:
>
> $_POST['SUBMIT']
> $SUBMIT
>
> and so far I have had no luck. I do have global variable turned on.
>
> Thanks,
> Dale
>
>