Php Login Script with Remember Me Feature

Topics: User, Login, PHP Pages: 3 (544 words) Published: July 6, 2011
PHP Login Script with Remember Me Feature
Posted on January 25, 2004
in Code
by JP (jpmaster77)
Rated 4.5 (Ratings: 32) (Add your rating)
Log in to add a comment
(750 comments so far)

Want more?

• More articles in Code
• More articles by jpmaster77


Member info | Full bio
User since: January 10, 2004
Last login: September 12, 2008
Articles written: 2


I just started programming with PHP and MySQL this week and the first script I wanted to write was a login script. I wanted to include the popular "Remember Me" feature seen on a lot of websites that basically keeps users logged into the website, even after they've closed the browser so that the next time they come, they won't have to login again manually. I found this tutorial Creating a PHP Login Script to be very helpful in writing this script, in fact, a lot of the code presented here is very similar to the code presented in that tutorial. The differences are seen with the new "Remember Me" feature, the use of cookies in addition to sessions, and with slight modifications in the design.


The ultimate goal is to create a PHP login script with the capability of remembering logged-in users. I also hope this tutorial will serve as a way to introduce people to user sessions and cookies in PHP.


Although this tutorial uses a MySQL database for storing user information, it has been written so that the data accessing code is separated from the main code through specific functions, so it would be easy to instead use a flat file "database" system, simply by changing the code in those specific functions, without messing with the rest. This tutorial uses the latest and greatest of PHP 4, which means super globals are used, such as $_POST, $_SESSION, etc.. This tutorial will aim to teach you about sessions and cookies through example, however if you need to know more information, go to the official website .


For those of...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Essay about me, me and only me
  • login Essay
  • Remember Me Essay
  • Remember Me Essay
  • Scripts Essay
  • Remember Essay
  • script Essay
  • Script Essay

Become a StudyMode Member

Sign Up - It's Free