Ok
I'm sure this is straight forward but its eluding me! I need to do a Header redirect back to various pages that access my script. I could do this by manually adding hidden form fields to let the script know which page has used it but I'm sure there must be an easier way.
So is there anyway to get the incoming url information i.e.
If I have three pages accessing the script say index.php, about.php and news.php is there a way to establish which page has accessed the script so I can then use it in the header redirect code to send it back to the page it has come from without using $_GET or $_POST.
Many Thanks
How to get an incoming url
Moderator: General Moderators
-
lettie_dude
- Forum Commoner
- Posts: 65
- Joined: Thu Dec 07, 2006 10:10 am
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Code: Select all
session_start();
$_SESSION['lastRequest'] = $_SERVER['REQUEST_URI'];-
lettie_dude
- Forum Commoner
- Posts: 65
- Joined: Thu Dec 07, 2006 10:10 am
Sweet
Cheers works a treat