Jump to content

Include_Once and Session Variables


MeanMrMustard

Recommended Posts

I need to pass some session variables to another page via the Include_Once command.

Does anyone know if this can be done and if so what the code would be? This is what I have so far and the session variables don't carry across...

Start.php

<?
Session_Start();
$Ref_Name = $_SESSION['Ref_Name'];
include_once("..common/header.php");

?>


Header.php

<?
Session_Start();
$Ref_Name = $_SESSION['Ref_Name'];

?>

Basically the Header needs the variable to dynamically create a menu to be displayed on the initial page.
Link to comment
https://forums.phpfreaks.com/topic/5380-include_once-and-session-variables/
Share on other sites

Archived

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

×
×
  • 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.