[PHP] Re: value submit button

2003-07-31 Thread hu zhenghui
You can get the button value use code below:

?php echo $_POST[submit];?
form method=post
input type=submit name=submit value=submit1
input type=submit name=submit value=submit2
/form

-- 

Hu Zhenghui
IBM Certified Solutions Expert IBM WebSphere Studio
New Intranet Series - Intranet DIY ISBN 7-5606-1163-X
Flash MX Tutorial for Training ISBN 7-900107-51-7
mailto:[EMAIL PROTECTED]
http://huzhenghui.51.net

Florian SchäFer [EMAIL PROTECTED] дÈëÏûÏ¢
news:[EMAIL PROTECTED]
 Hallo out there,

 i hava an document, with one form and two Submit buttons.
 How can i check in the target document wich button is pressed?
 tried something like   if ($submit == 'xxx') .
 anyone has a hint?






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



Re: [PHP] Re: value submit button

2003-07-31 Thread Justin French
Do some testing in a few browsers to see what happens when the user 
hits enter or return, rather than clicking on the button(s)... I 
*think* you need to put in a hidden element.  For example, if you 
wanted submit2 to be the default value:

?=$_POST[submit]?
form method=post
input type=hidden name=submit value=submit2 /
input type=submit name=submit value=submit1 /
input type=submit name=submit value=submit2 /
/form
Justin



On Friday, August 1, 2003, at 02:36  PM, hu zhenghui wrote:

You can get the button value use code below:

?php echo $_POST[submit];?
form method=post
input type=submit name=submit value=submit1
input type=submit name=submit value=submit2
/form


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


[PHP] Re: value submit button

2002-08-02 Thread Ryan

ug

Florian SchäFer wrote:
 Hallo out there,
 
 i hava an document, with one form and two Submit buttons.
 How can i check in the target document wich button is pressed?
 tried something like   if ($submit == 'xxx') .
 anyone has a hint?
 
 


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




[PHP] Re: value submit button

2001-07-24 Thread Micha

hi,
example:

 html file 

form action=form_send.php method=post
Your username: input type=text name=user
input type=submit name=login value=Login
input type=submit name=remove value=Delete Account
/form

 php file 

if (isset($login)) {
  // Do login...
} else if (isset($remove)) {
  // Remove user...
}

Florian SchäFer wrote:

 Hallo out there,

 i hava an document, with one form and two Submit buttons.
 How can i check in the target document wich button is pressed?
 tried something like   if ($submit == 'xxx') .
 anyone has a hint?

--
Linux...
Because it works.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]