Zen Cart Logo
Forums / General Questions / Passing variables without $_SESSION

Passing variables without $_SESSION

Views: 1,009

Results 1 to 2 of 2
26 Oct 2011, 2:47 PM
#1
fred_tededmondsson avatar

fred_tededmondsson

New Zenner

Join Date:
Jul 2011
Posts:
26
Plugin Contributions:
0

Passing variables without $_SESSION

Hi, all,

I'm having some trouble doing something with my zc 1.3.9 site.

I won't get into the exact specifics, but I am basically trying to set a variable from one php file that is not part of ZC so that it can be checked from html_header.php in the common templates, where I've added code to look for it.

The problem seems to be that my attempts to use a (new, unique) session variable for this ($_SESSION['blah'] = true) are interfering with ZC's use of $_SESSION. The variable I'm creating is getting 'cleaned' and is no longer a member of $_SESSION by the time ZC's index.php finishes loading.

So where can I put a global so that ZC will leave it alone? I think the application start module called from index.php cleans out $_SESSION, $_GET and $_POST

TIA,
Fred

31 Oct 2011, 6:25 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Passing variables without $_SESSION

Your specifics would be helpful if you want more specific help.

In the interest of security, Zen Cart starts its own session, so whatever session variables you set before Zen Cart code runs, are not visible to Zen Cart, nor vice-versa.