title: shopping cart and Session ID
body: <p>I try to execute a shopping cart .In the beginning I save  the selected products in an array SESSION
  while the customer order doesn't complete.
  But,my work was imperfect because I don't use the session ID and I don't insert the selected products
  to database,therefore I can't management the sessions.
  Now, I want to improve my code to get an unique sessionID for each customer.
  I see more examples in this issue and here I want to know which better to use:</p>
  
  <pre><code>//session_id($_GET['PHPSESSID']); session_start();
  $session_id=session_id('PHPSESSID');
  </code></pre>
  
  <p>-OR-  </p>
  
  <pre><code>session_start();
  $sessionID = $_COOKIE['PHPSESSID'];
  </code></pre>
  
  <p>then,I will save the selected products to db width this  $session_id.</p>
  
  <p>note that, I use a simple way to complete the customer order and store the selected
  items to db, which is via customer email verification .after custmer verify his/her email
  I want to go back him/her to a page that he/she can update his/her cart items or continue shopping.
  here how to get the $session_id  to do that successfully.
  please guide me in this issue.Thanks</p>