Referer header location incorrect redirect...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Referer header location incorrect redirect...

Post by JAB Creations »

Here is my PHP...

Code: Select all

$page = $_SESSION['referer'];
header('Location: '.$page);
Let's say I edit...
http://localhost/version28/home/home-news.php

When I save the file (template editor) I get redirected based on the above code to...
http://localhost/version28/editor/home-news.php

How can I dynamically adapt it so the header location gives me the desired path?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Magic.

Based on the code you've given us, you are doing absolutely nothing. You reallllly need to give more information.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

superdezign wrote:Magic.
But, PHP is magic. ;)
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Post by JAB Creations »

If PHP is magic I've got to figure out how to convert from voodoo. :wink: I fixed the issue btw, thank you.
Post Reply