Temporary cookies :

By Default Temporary cookie is active which is store in browser memory, live until browser  is closed.

Persistent Cookie: persistent cookie is a cookie which is stored in a cookie file permanently on the browser’s computer.

Which is live for a time period defines by programmer in the script.

Example:

  1. <html>  
  2.  <body>  
  3. <?php
  4. $value = ‘value’;
  5. setcookie(“testcookie”, $value, time()+3600); /* expire in 1 hour */
  6. // Where 3600 count in 60*60*1 [second*minute*hour]
  7. ?>
  8.  </body>   
  9. </html>  
eXTReMe Tracker