Jump to content

Remember Me, Register & Login - phpacademy


LyleCrumbstorm

Recommended Posts

I hope I am posting in the appropriate place. Although I didn't create this code I did write it while following along with the phpacademy 44 video tutorial on Register & Login. Next I followed the 6 video tutorial on creating a "Remember Me" cookie in order to bypass the login. Unfortunately these 2 series were not designed to go together so I am left with a very complex login system via "Register & Login" and no understanding of how to implement the "Remember Me" feature.

 

Before I go uploading any code or copying & pasting anything I would like to throw out a general question as I've posted this on several message boards & PHP Forums so far to no avail - Is there anyone here who has implemented a "Remember Me" feature into the "Register & Login" series presented by phpacademy? This might be a simple exercise within any other login system but this one seems to have left everyone stumped so far.

 

I will gladly upload any files or make any informatio available if anyone is interested. Otherwise it is a lot work only to risk looking like someone who is asking for handouts. 

Link to comment
Share on other sites

If the user checks "Remember Me," set a cookie that will never expire with his username and a unique token that you can store on your server and check authenticity. When the user leaves for a while, his session might time out, but when he comes back, you can log him back in automatically if the token matches what you stored for him.

 

http://us3.php.net/manual/en/function.setcookie.php

Link to comment
Share on other sites

I understand that. This problem requires someone familiar with how this specific login routine was written. I'm ashamed to admit that I am too much of a newbie to figure this out on my own and countless hours of struggling has returned the most success I've had which is an endless loop (meaning I've set the dang cookie successfully but I can't trace the logic back to where the loop is happening.)

 

I know, I know - how straightforward could this be?! That's what I thought until the past week of posting this question on every PHP Message Board has only resulted in more confusion by everyone involved. I'll gladly post whatever code you, or anyone else would like to see but there is an ever-loving crapton of it as this Register & Login system is exceptionally involved.

Link to comment
Share on other sites

This problem requires someone familiar with how this specific login routine was written.

 

that's not correct. it requires someone with enough understanding of the php language (and of the security implications) that they can identify where in the login code to add the logic to do the first step of what lemmin stated and where in the logged-in session check code to add the logic to do the second part of what lemmin stated. it would also require someone to add the checkbox to the form, to add a column to the database table to hold the unique token value, to modify the logout code so that it clears the unique token in the database table, along with creating or identifying those parts of the remember me logic.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.