title: Replacing Session with Cookie
body: <p>Recently I got an implementation of a shopping cart that needs a fix.</p>
  
  <p>The shopping cart object is stored in a <code>$_SESSION['cart']</code>. Now there is a problem when the browser is closed, the cart is lost, because sessions do not remain active after the browser is closed.</p>
  
  <p>The way to fix this is to store the cart object in a cookie with longer lifetime instead of a session.</p>
  
  <p>My question to you is if you know a quick fix, or do I really have to go though all the source files and replace the sessions with cookies?</p>