nana Posted October 31, 2005 Share Posted October 31, 2005 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 More sharing options...
johnew Posted October 31, 2005 Share Posted October 31, 2005 not sure if this is what you need but here is a form function script that allows you to gather form data and build a valid 'get' query string. http://www.dithered.com/javascript/form/index.html john Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 31, 2005 Share Posted October 31, 2005 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 More sharing options...
nana Posted November 1, 2005 Author Share Posted November 1, 2005 thank you john but that is not what i had in mind thanks jack i figured it out on to the next step Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.