Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

An Introduction To PHP Sessions


This article is an introduction to using sessions in PHP, including:

  1. What is a session?
  2. How do I use a Session?
  3. How do sessions work?
  4. How do I change the value of a session variable?
  5. Can I destroy a session variable?
  6. What should I do to destroy a whole session?
  7. Can I store an array in a session?
  8. Can I store an object in a session?
  9. Can I store an file pointer in a session?
  10. How are sessions stored?
  11. When do sessions expire?
  12. How can I send headers then start a session?
  13. Session security

This article was originally published at a, and is reproduced on PhpRiot with permission of the author, Kevin Waterson.

In This Article