Jump to content

Using one of two session variables that are loaded


Harlequin

Recommended Posts

Hi

 

Maybe a strange request and perhaps someone here knows a better way of doing what I want.

 

I have a sign up form on my website that automatically pulls the session var 'name' and places this in the text field for "Reference". That way I know which agent signed up a customer.

 

What I need to do now though is allow this variable to be injected through the url for click through banners.

 

This what I've done (within the header HTML Tags):

 

if ($_GET['Reference'] == '')
{
$_SESSION['Name']        = $my->name;
}
else
{
$_SESSION['Name']        = $_GET['Reference'];
}

 

However, even though this is loaded on EVERY page view the variable is empty if the user clicks another page.

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.