Jump to content
Larry Ullman's Book Forums

Lesson 11 - Last Pursue Question

Recommended Posts

the last pursue question says: use the combination of writing to and reading from text files, plus either sessions or cookies, to create a real registration and login system.


I am having a problem wrapping my head around the concept of using the session in the registration process and how you would make this unique to the person logging in.


What i understand so far is this:


- when a person registers, their username and password gets written to a file

- when they loggin the script checks the just entered username and password to see if it matches with a username and pass on file

- if it does match I should send a cookie saying something like $_COOKIE['logged_in'] = TRUE.

- then in the follwing pages of the website, I should check for this 'logged_in' cookie to see if it is there.



What I don't get is how to make the logged_in cookie personal to the specific user. For example, when I login to my bank website, I want to see my money, not another users money. Or is this pursue question just asking for the baby step of creating this generic cookie only, and later on we will learn how to make it specific.


Thanks for the help.



Link to comment
Share on other sites


  • Create New...