blufish Posted August 8, 2008 Share Posted August 8, 2008 Okay so I have a form with a "submit" button and a "preview" button. How do I make it so that I can check which button was pressed? Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted August 8, 2008 Share Posted August 8, 2008 if you want to check which one was pressed instantly, you need to use either Javascript or AJAX. otherwise, you can find out with PHP... <?php if(isset($_POST['button1'])) { echo "Button 1 was Pressed!"; } elseif(isset($_POST['button2'])) { echo "Button 2 was Pressed!"; } ?> Quote Link to comment Share on other sites More sharing options...
blufish Posted August 8, 2008 Author Share Posted August 8, 2008 thanks! Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted August 8, 2008 Share Posted August 8, 2008 no worries Quote Link to comment 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.