Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

can i have two submit button for one form


nana

Recommended Posts

i am trying to have two submit button for one form

i have already put the <?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?>

where i want to display the second button

so far so good but i need to know which submit button is clicked so i can do diffrent things based on that

i have gotten this from another forum but can not implement it

$html = '<input type="submit" name="action" value="Delete" />

<input type="submit" name="action" value="Add" />';

 

switch($_POST['action'])

{

case 'Delete':

//do delete action here

break;

 

case 'Add':

//do add action here

break;

 

default:

break;

}

if anyone know how to do this it would be great help

Link to comment
Share on other sites

Frank - Yes, you can do that. You have to give each submist button a unique identifier. See my SEO Assistant code for an example.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...