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
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
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
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
4 matches
Mail list logo