ShaolinF Posted December 16, 2009 Share Posted December 16, 2009 Hi Guys If I have two submit btns, one to cancel the other to confirm, how do I determine which one has been clicked ? <input type="submit" name="cancel" value="cancel"/> <input type="submit" name="confirm" value="confirm"/> Quote Link to comment https://forums.phpfreaks.com/topic/185370-two-buttons-which-one-clicked/ Share on other sites More sharing options...
cags Posted December 16, 2009 Share Posted December 16, 2009 if(isset($_POST['cancel'])) { // cancel } elseif(isset($_POST['confirm'])) { // confirm } Quote Link to comment https://forums.phpfreaks.com/topic/185370-two-buttons-which-one-clicked/#findComment-978585 Share on other sites More sharing options...
Gayner Posted December 16, 2009 Share Posted December 16, 2009 if(isset($_POST['cancel'])) { // cancel } elseif(isset($_POST['confirm'])) { // confirm } edit: oops cagey posted Quote Link to comment https://forums.phpfreaks.com/topic/185370-two-buttons-which-one-clicked/#findComment-978586 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.