timpearson26 Posted January 14, 2012 Share Posted January 14, 2012 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. Tim Link to comment Share on other sites More sharing options...
Larry Posted January 17, 2012 Share Posted January 17, 2012 Well, the intent was just to do the baby step, but to make it personal, all you have to do is stored something unique in the cookie, such as the user's name. Link to comment Share on other sites More sharing options...
Recommended Posts