![]() |
Header Location Question
Hi,
I'm new to PHP and was wondering how to code to go back to the previous page after executing a script. I was told to use the following command: header("Location: " . $_SERVER['HTTP_REFERER']); exit; Is this the best way to do this? Is there another way? Thanks! |
be careful in that there can be no other output previous to that command meant for the screen.
|
Quote:
If you want to Automatically redirect the user to the previous page then its the shortest method. If not then you can use JavaScript's history.back() too |
| All times are GMT -8. The time now is 02:51 PM. |
Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.