SirChick Posted October 27, 2007 Share Posted October 27, 2007 I have 4 submit buttons on my form as so: <input type="submit" id="Button1" name="Button1" value="West" style="position:absolute;left:225px;top:74px;width:75px;height:24px;z-index:0"> <input type="submit" id="Button2" name="Button2" value="North" style="position:absolute;left:367px;top:19px;width:75px;height:24px;z-index:1"> <input type="submit" id="Button3" name="Button3" value="South" style="position:absolute;left:369px;top:114px;width:75px;height:24px;z-index:2"> <input type="submit" id="Button4" name="Button4" value="East" style="position:absolute;left:512px;top:80px;width:75px;height:24px;z-index:3"> And i was just wondering is there a way in the process page to do if "if button1 is pressed" {do this} i was unsure how you check a value of a submit button to determine which one is pressed.. hope you can help Quote Link to comment https://forums.phpfreaks.com/topic/75049-solved-quick-question-about-forms/ Share on other sites More sharing options...
Orio Posted October 27, 2007 Share Posted October 27, 2007 <?php if(isset($_POST['Button1'])) { //... } elseif(isset($_POST['Button2'])) { //... } ?> Orio. Quote Link to comment https://forums.phpfreaks.com/topic/75049-solved-quick-question-about-forms/#findComment-379502 Share on other sites More sharing options...
cooldude832 Posted October 27, 2007 Share Posted October 27, 2007 if you trying to make a map compass submission let me know I have one that uses JS and a graphical interface. Quote Link to comment https://forums.phpfreaks.com/topic/75049-solved-quick-question-about-forms/#findComment-379503 Share on other sites More sharing options...
SirChick Posted October 27, 2007 Author Share Posted October 27, 2007 thanks guys. i pm'd you cooldude Quote Link to comment https://forums.phpfreaks.com/topic/75049-solved-quick-question-about-forms/#findComment-379506 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.