Add *ANOTHER* variable in the header("Location:") code that says
"&redirect=1"
In your page3, do:
if($redirect){
$menuID = $foo;
}
else{
$menuID = $bar;
}
Where foo comes from the location, but bar comes from page2.
--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Chrisy <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 08, 2001 5:03 PM
Subject: header(Location:...) is redirect: looking for full link
> hi,
>
> The long explanation is below the summary.
>
>
> SUMMARY
>
>
> page1.php
> Header(location:page2.php)
>
>
> page2.php
> HTML link to page3.php
>
>
> page3.php
> REFERER=page1.php
>
>
> But in page3 i WANT to see page2.php as REFERER.
> So i suppose i must change something in page1. But what?
>
>
>
>
> XXXXXXXXXXXXXXXXXXXXXXXXXXX
>
>
>
> THE LONG:
>
> i am working on a dynamic menu module for postnuke.
>
> When a page is called with page.php?menuID=23000 that means the second
> main menu is opened, and of that branch the 3rd subbranch:
>
> > MENU1
> V MENU2
> * MENU21
> * MENU22
> V MENU23
> * MENU231
> * MENU232
> > MENU3
> > MENU4
>
> In effect this means i make the part of the page which makes the menu.
> I can't use a form and i can't use session.
>
>
> Now my poroblem is when people follow a link in the menu which in
> itself has subpages, the folllowing links can not be expected to
> always contain the menuID part. In effect the menu would unfortunately
> close.
>
>
> Now i did this trick: i would read menuID in the referer and
>
>
> Then i would do
> header ('location:'.thispageURL. '&menuID'. $menuID);
>
>
>
> So:
> 1) REFERER?menuID=123
> --links-to-->
> 2) page.php?nada=0
> --checks-(finds no menuID so looks it up in
> referer)then-redirects->
> 3) page.php?nada=0&menuID=123
>
> Works nice up till then. But.....
>
>
> Okay, now that page is allright but as header (location) is a
> REDIRECT, the following page does not see the added menuID as it uses
> the URI of step 2).
>
> help..
> Chris
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]