Jump to content

clearing a certain session


zang8027

Recommended Posts

i got a session running if the user is logged in called SESSION['user'];

 

Next, i got the shopping cart session that is called SESSION['cart'];

 

Then i got SESSION['rest']; that holds rest ID on all the pages, which needs to be deleted if the user clicks "clear cart"

 

 

not too good to have all of em i bet but it was the only way i could get this site to work the way it is :-/

not too good to have all of em i bet but it was the only way i could get this site to work the way it is :-/

 

You can store whatever you like in your session. Its still only one session array though, you had me a little confused.

 

All you need to is unset the array element your don't want. eg;

 

unset $_SESSION['rest'];

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.