O'Reilly logo

PHP & MySQL: Novice to Ninja, 6th Edition by Kevin Yank, Tom Butler

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 11: Cookies, Sessions, and Access Control

In the last chapter, I showed you how users can register accounts on the website. Now it’s time to make those accounts functional, so that users can log in to the website. The process is familiar to web users: they enter a username and password, and get access to content that’s unique to their account.

Although a familiar process from the perspective of someone using the website, for a developer, building a website that allows logging in can seem daunting at first.

By its nature, HTTP is stateless. You connect to a website, the server gives you a file. As you’ve already seen, you can send data from the browser to the server using GET variables and HTML forms. However, the information is provided ...

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