O'Reilly logo

PHP for Teens by Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Sessions

As you learned in Chapter 12, cookies allow you to save a small file, on the user’s computer, that recorded some data in a variable. However, there are a few problems with saving data inside cookies for use in all your site’s pages:

  • Cookies are stored on the user’s computer. This means that the user can go into the cookie file and edit the text to change the results of a page.

  • Cookies are not super reliable. They can be turned off, deleted, and edited by hand, so you have to worry about what a knowledgeable user can do with cookies you create.

  • A lot of Internet viewers don’t like cookies, because they can track down visitors’ locations and use them for advertising purposes. In fact, a lot of people on the Internet hate cookies ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required