Exercises

  1. Create a user preference form in which a user can choose a page color and enter a name. Use a cookie to ensure that the user is greeted by name on subsequent pages and that the page is set to the color of her choice.

  2. Amend the scripts you created in exercise 1 so that the information is stored in a query string rather than a cookie.

Get Sams Teach Yourself PHP in 24 Hours, Third Edition 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.