Jump to content

Archived

This topic is now archived and is closed to further replies.

Mr.x

Pass variable to an Include?

Recommended Posts

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?

Share this post


Link to post
Share on other sites
This seems to me easier with session variables.

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

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

Share this post


Link to post
Share on other sites

×

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.