mellis95 Posted March 5, 2010 Share Posted March 5, 2010 I know I must have a simple mistake in here somewhere, but I just can't find it. I have the following HTML buttons to submit a form: <td><input type="submit" name="back" value="BACK"> <input type="submit" name="save" value="SAVE"> <input type="submit" name="continue" value="NEXT"> <input type="button" value="Check Spelling" onClick="openSpellChecker();" /> </td> They all submit to "submit_page_7.php" on submit_page_7.php I have the following at the end of my db updates: if($_POST[save]){ header("location: http://$sname/therapydoc/view/documentation/page_7.php?doc_id=$doc_id&&a=$a&&pid=$pid"); ob_flush(); } else if($_POST[back]){ header("location: http://$sname/therapydoc/view/documentation/page_6.php?doc_id=$doc_id&&a=$a&&pid=$pid"); ob_flush(); } The problem is, if I click the "BACK" button, it is going to page_7.php. If I click the "SAVE" button, it is going to page_6.php..... exactly the opposite of what it is suppose to do. I have had this redirect working for months with only the SAVE button. but adding the BACK button is causing me problems. What am I overlooking/not aware of here? Thanks for the help. Matt Link to comment https://forums.phpfreaks.com/topic/194251-header-redirect-need-another-set-of-eyes/ Share on other sites More sharing options...
mellis95 Posted March 5, 2010 Author Share Posted March 5, 2010 Nevermind. I knew it was something stupid. my form action was wrong, even though I had looked at it multiple times. I guess I have been looking at the monitor too long. Link to comment https://forums.phpfreaks.com/topic/194251-header-redirect-need-another-set-of-eyes/#findComment-1021934 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.