Applying Cookies and Sessions

This section demonstrates how you use cookies and sessions in a small login and user administration application. The web application is similar to the one in Chapter 11 but differs in how you authenticate users. Two forms are used in this application. One is a nonauthenticated SignOn.php file, and the other is an authenticated AddUser.php file.

The SignOn.php file is your preauthentication entry portal to the application. It is also your redirection target page when users fail to authenticate on other web pages. The SignOn.php form provides a generic login screen. The session will only start when the user attempts to authenticate. When the user clicks the Submit button, SignOn.php calls the AddUser.php form, which ...

Get Oracle Database 10g Express Edition PHP Web Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.