kelleydl Posted August 25, 2009 Share Posted August 25, 2009 I have a form which on submit click sends information to post.php which checks the information and then adds it to the database. after that it goes back to the main page and prints out the database onto my index.php in a table. i was hoping to have 2 submit buttons that would do different things when clicked. but i dont know how to do that.. can anyone send me in the right direction with this? the action can either be sent to post.php or stay in index.php where the submit buttons originally are Link to comment Share on other sites More sharing options...
chibineku Posted August 25, 2009 Share Posted August 25, 2009 You would need an intermediate page to determine the name of the button that was clicked, or you could use javascript to change the action as the button press happens. Or just roll all of the stuff that happens in the possible target pages into one, branched depending on which submit button was pressed. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 25, 2009 Share Posted August 25, 2009 There's a description here about handling multiple submit buttons in a form:http://w3schools.invisionzone.com/index.php?showtopic=12509 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.