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 Link to comment https://forums.phpfreaks.com/topic/276538-submit/ 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 } Link to comment https://forums.phpfreaks.com/topic/276538-submit/#findComment-1422936 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. Link to comment https://forums.phpfreaks.com/topic/276538-submit/#findComment-1422989 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.