header(Location:...) is redirect: looking for full link

From: Date: Sat, 08 Sep 2001 22:03:58 +0000
Subject: header(Location:...) is redirect: looking for full link
Groups: php.general 
Request: Send a blank email to php-general+get-66544@lists.php.net to get a copy of this message
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

« previous php.general (#66544) next »