SocomNegotiator Posted July 22, 2008 Share Posted July 22, 2008 Ok I have a page that is called current_orders.php. This page queries my DB for items and then each item is brought up with a delete button next to it. Well when I click that delete button it brings me to delete_item.php. From there this page just queries the DB and then deletes the item that was selected if the user chooses yes. If they choose yes then they are then sent to request_success.php. Well is there a way I can have them redirected to where they came from? Because as of right now I have them re-directing to the home page. And since request_success.php is used on more than just delete an item I can't just put the header("Location:") at current_orders.php. Is there anything I can...? Link to comment https://forums.phpfreaks.com/topic/115972-solved-re-direct-to-page-user-was-on/ Share on other sites More sharing options...
samshel Posted July 22, 2008 Share Posted July 22, 2008 two ways 1) you pass the current file name by $_GET to delete_item.php and redirect to this variable. 2) you can use $_SERVER['HTTP_REFERER']; i prefer option 1) Link to comment https://forums.phpfreaks.com/topic/115972-solved-re-direct-to-page-user-was-on/#findComment-596258 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.