Jump to content

skeg0

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

skeg0's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. can anyone help with this! it isnt working and i dont know why. i just want the code to check where a person has come from (referer) and view an appropriate php menu screen... if ($HTTP_REFERER == 'www.something.com/123.php') require('123_top_template.php'); else require('top_template.php'); any suggestions?? cheers
  2. [!--quoteo(post=358851:date=Mar 27 2006, 01:14 PM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ Mar 27 2006, 01:14 PM) [snapback]358851[/snapback][/div][div class=\'quotemain\'][!--quotec--] [code]if ($referer == 'menu1.php')        $req_menu = 'menu2.php'; else        $req_menu = 'menu1.php'; //OR $req_menu = ($referer == 'menu1.php') ? 'menu2.php' : 'menu1.php';[/code] [/quote] thanks very much.. do i have to define these variables somewhere? the $referer and $req_menu or are they already known by php?
  3. im wondering if anyone can help me as im new to php. I have a database driven php webpage that contains a menu at the top of each page called "top_template.php".. when a link is clicked to load a new page, it automatically reloads this "top_template" with a --- require "top_template.php"; --- command in the main body part of the page. however, there will be some times when i need to load up a different menu at the top depending on what the previous page was. so i was wondering if php has commands in it that will allow for an IF statement along the following lines: if the referer (the page link that referred to this new page) == "menu1.php" THEN require "menu2.php" ELSE require "menu1.php" or if menu2 is visible THEN require "menu2" ELSE require menu1 it is just the direct syntax of these statements i need as it is written above, if anyone could help me i would be extremely grateful!!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.