sessions getting closed when i close my broswer

  • 1
  • Question
  • Updated 10 years ago
  • Answered
hi,

i have designed shoppingcart with session variable .i have used code session_start() to start the session ,i have selected few items in my shopping cart when i close the browser and reopen the same page shopping cart is getting empty i want to see the selected items in shopping cart even if i close the browser .is there any solution for it.plz help me .

Thanks,
usha
Photo of usha

usha

  • 18 Posts
  • 0 Reply Likes
  • frustrated

Posted 10 years ago

  • 1
im not sure about this one unless maybe you can make it put a cooke on the customers computer so it remembers them?
Photo of Ruth

Ruth

  • 2819 Posts
  • 135 Reply Likes
Hi usha,

I'm not sure what you mean. Can you give us some more information please?
Photo of usha

usha

  • 18 Posts
  • 0 Reply Likes
i have something like this in my code for shopping cart
session_start();
$_SESSION['cart'] as $product_id => $quantity
$product_id is the key and $quantity is the value

i am adding few items to the shoppingcart and when i close the browser and open new browser i cannot see the previous items the selected in the shoppingcart .is there any way i can see the items i selected in shoppingcart even if i close and open new browser
Photo of Marije

Marije, Official Rep

  • 4636 Posts
  • 237 Reply Likes
Hi usha,

Are you trying to add custom PHP code to your site or is this an error you're seeing when you add the the shopping cart?

Adding PHP code won't work with SynthaSite.

If it's an error you're seeing, please could you post your URL so that we can take a look.