Hi all,
We have a form with two submit buttons each with a unique name/id and value so that we can determine in PHP validation which button was clicked. The form action is the same page for both. That is, the action page must determine which button was clicked and process code accordingly.
Button 1:
Button 2:
PHP check to see which submit value was passed (clicked):
This works in all browsers EXCEPT IE6 where the name of the submit button is not set and the value is empty.
What is up with IE? Can you not have name/value pair for a submit button in IE? Will it not send as a POST variable?
Help!
Thanks.
We have a form with two submit buttons each with a unique name/id and value so that we can determine in PHP validation which button was clicked. The form action is the same page for both. That is, the action page must determine which button was clicked and process code accordingly.
Button 1:
Code:
<input type="image" src="/button_update.gif" id="update_submit" name="update_submit" value="true" />
Button 2:
Code:
<input type="image" src="/button_continue.gif" id="create_account_submit" name="create_account_submit" value="true" />
PHP check to see which submit value was passed (clicked):
Code:
if( isset($HTTP_POST_VARS['create_account_submit']) && ($HTTP_POST_VARS['create_account_submit']=='true') )...
This works in all browsers EXCEPT IE6 where the name of the submit button is not set and the value is empty.
What is up with IE? Can you not have name/value pair for a submit button in IE? Will it not send as a POST variable?
Help!
Thanks.