Jump to content
Larry Ullman's Book Forums

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.

 

Tim

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...