Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

sessions


adams

Recommended Posts

I understand the standard idea of sessions, but I'm stuck here.

 

I have secured the admin area with htpasswd/htaccess. I added a variable to the admin (index.php):

$_SESSION['adminAuth'] = 'true';

so that once a user logs in I want to be able to track them on other pages.

Cart is installed in /store/ and Admin at /store/admin/

 

I put a little debugging at the bottom of the index.php and the session variable is being set.

 

Now I have some links at the top that of the page so that the user can navigate around and here is where I am trying to use the adminAuth session to display an additional ADMIN link if they have already logged into the admin area.

 

The problem is that in another page like /privacy.php I do an echo of the _SESSION['adminAuth'] and it is not set?

 

Is there something different that I need to do to SET session variable inside the admin/cart so that I can access it outside the cart on other pages?

 

Thanks in advance.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...