

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


CSCI 2910 – Client/Server-Side Programming Sessions in PHP – Page 1 of 13
Topic: Sessions in PHP Reading: Williams & Lane pp. 338-
CSCI 2910 – Client/Server-Side Programming Sessions in PHP – Page 2 of 13
Today’s lecture will cover:
CSCI 2910 – Client/Server-Side Programming Sessions in PHP – Page 3 of 13
CSCI 2910 – Client/Server-Side Programming Sessions in PHP – Page 5 of 13
CSCI 2910 – Client/Server-Side Programming Sessions in PHP – Page 6 of 13
CSCI 2910 – Client/Server-Side Programming Sessions in PHP – Page 7 of 13
if (!isset( $_SESSION['quantity'] )) $_SESSION['quantity'] = 0; else $_SESSION['quantity']++;
CSCI 2910 – Client/Server-Side Programming Sessions in PHP – Page 8 of 13
CSCI 2910 – Client/Server-Side Programming Sessions in PHP – Page 9 of 13
CSCI 2910 – Client/Server-Side Programming Sessions in PHP – Page 10 of 13
CSCI 2910 – Client/Server-Side Programming Sessions in PHP – Page 11 of 13
Hello, World! in PHP
CSCI 2910 – Client/Server-Side Programming Sessions in PHP – Page 12 of 13
If you receive a signal from the client that they are ending the session, e.g., clicking on a link to log out, there is a method you can use to force a session to end.