Skip to main content
Known Participant
June 14, 2012
Question

PHP Remember Me?

  • June 14, 2012
  • 2 replies
  • 988 views

I accidently posted this in the plain Dreamweaver forum.. forgive me.  I'm looking for a way to enhance the current DW CS5 PHP login authorization scripting to be a "remember me" feature as well...  pointers!?

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Participating Frequently
June 14, 2012

I don't know of any extensions, but here's how I did it many moons ago. For each user account, in addition to the login credentials I also create a random passkey. If they user selects the "Remember Me" checkbox, I store the user login and passkey cookies. When the user accesses a restricted page, I check if those cookies are set and if so, I compare the database passkey to the cookie value. I felt that was safer than merely checking a "remember me" boolean value. Maybe this is overkill but it felt safer to me. I also do not want to store the users regular password in a cookie.

Community Expert
June 14, 2012

So you are looking at how to implement cookies.  This tutorial should give you a basic overview.

http://www.tizag.com/phpT/phpcookies.php

If you are farther along than that and need specific help with your system, we may need to see the code you have.