Mamo Posted April 4, 2013 Share Posted April 4, 2013 Hi I have one form that contains two submit button, I want from each button to take me to a different page, Is there any way to do that while the two of them are still in the same form, Or I should put each one in a different form. thank you Quote Link to comment Share on other sites More sharing options...
Jessica Posted April 4, 2013 Share Posted April 4, 2013 <input type="submit" name="submit" value="One" /> <input type="submit" name="submit" value="Two" /> <?php if($_POST['submit'] == 'One'){ // One }else if($_POST['submit'] == 'Two'){ // Two } Quote Link to comment Share on other sites More sharing options...
Mamo Posted April 5, 2013 Author Share Posted April 5, 2013 <input type="submit" name="submit" value="One" /> <input type="submit" name="submit" value="Two" /> <?php if($_POST['submit'] == 'One'){ // One }else if($_POST['submit'] == 'Two'){ // Two } Thank you Jessica. 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.