bindiya Posted December 11, 2010 Share Posted December 11, 2010 I have 2 different forms in my webpage.The problem is only the submit button of one form is getting active all time.how can i remove this Link to comment https://forums.phpfreaks.com/topic/221301-is-there-any-way-by-which-we-can-understand-which-submit-button-is-clicked/ Share on other sites More sharing options...
Adam Posted December 11, 2010 Share Posted December 11, 2010 Assign the submit buttons different names, then just check which is set: <input type="submit" name="form1_submit_button"> <input type="submit" name="form2_submit_button"> if (isset($_POST['form1_submit_button'])) { // process } elseif (isset($_POST['form2_submit_button'])) { // process } Link to comment https://forums.phpfreaks.com/topic/221301-is-there-any-way-by-which-we-can-understand-which-submit-button-is-clicked/#findComment-1145773 Share on other sites More sharing options...
Adam Posted December 11, 2010 Share Posted December 11, 2010 Just realised this is in the JS forum. How are you triggering the submit event? Link to comment https://forums.phpfreaks.com/topic/221301-is-there-any-way-by-which-we-can-understand-which-submit-button-is-clicked/#findComment-1145774 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.