Jump to content


Photo

Pass variable to an Include?


  • Please log in to reply
1 reply to this topic

#1 Mr.x

Mr.x
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 07 July 2006 - 06:30 AM

Hello Everyone,

I'm working a menu bar but was hoping to stay away from javascript and when a user clicks on say for instance Flowers then the menu offers more options below on the next page. I have a header file, so was thinking if I am able to either call or pass on expand="flowers" then just have an if expand == "flowers" print etc.

Any Suggestions?

#2 CheesierAngel

CheesierAngel
  • Members
  • PipPipPip
  • Advanced Member
  • 105 posts
  • LocationBelgium

Posted 07 July 2006 - 07:08 AM

This seems to me easier with session variables.

// --PAGE1 --
$_SESSION['flowers'] = expand;

// --PAGE2 --
 if($_SESSION['flowers']) {
  // -- expand flowers --
}





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users