Zen Cart Logo
Forums / Customization from the Admin / how do I access the $_SESSION['customer_id'] variable outside of ZenCart

how do I access the $_SESSION['customer_id'] variable outside of ZenCart

Locked

Views: 1,844

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
23 Nov 2006, 7:27 PM
#1
Join Date:
Mar 2005
Posts:
24
Plugin Contributions:
0

how do I access the $_SESSION['customer_id'] variable outside of ZenCart

Can someone please simply tell me how I access the value of $_SESSION['customer_id'] from a PHP page outside ZenCart?

I understand how to use PHP sessions.

I usually use the following lines of code at the top of my PHP pages that use sessions:

session_cache_limiter('must-revalidate');
session_start();

If I try and output the customer_id value (after I have logged into ZenCart) from a page outside ZenCart using the following line:

printf ("customer_id = %s", $_SESSION['customer_id']);

... I get nothing displayed as the value of customer_id.

Any help would be greaty appreciated.

Thanks,

Andy