How to set cart for a day
<p>I am working on a shopping cart application. when user select particular product, then that product's id, quantity and price store in session. But when I close the browser all data from $_SESSION['cart'] is deleted, but I want when again I visit my site the last selected entity should be display. I am using price, qty and product id as - </p>

<pre><code>&lt;?
$_SESSION['cart'] = array();
$_SESSION['cart'][0]['productId'] = $pid;
$_SESSION['cart'][0]['qty'] = 1;
$_SESSION['cart'][0]['price'] = $price
?&gt;
</code></pre>

<p>please tell me how to retain the selected values in session even after closing the browser. If you have any other approach? Thanks.</p>
