Chapter 16 – Cookies and Sessions
- cookie_write.php – Writing a cookie, write ‘Paul’
- cookie_read.php – Reading a cookie
- cookie_read2.php – Reading a cookie with a test to see if it exists
- cookie_write2.php – Writing a cookie which expires in the future
- cookie_write3.php – Writing a cookie – an array of cookies
- cookie_read3.php – Reading an array of cookies
- session_test.php – A session test script
- cart.php – A shopping cart
This code sample is from a chapter in the book PHP-Tutorials:Programming with MySQL and PHP.
You can read more about the book by going here: