Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

PHP Tutorials: 'Remember me' style Login System using Cookies and Sessions (Part 4)

Loading...

Sign in or sign up now!
12,473
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 8, 2009

Visit the forum for help!
http://phpacademy.info/forum

Follow on Twitter!
http://twitter.com/phpacademy

Create a cookie/session based login system with a 'remember me' checkbox to keep your user logged in for next time they visit.

Link to this comment:

Share to:

Uploader Comments (phpacademy)

  • 7200 seconds are two hours, not 48 hours.

    7200 / 60 = 120, 120 / 60 = 2.

  • Oops! Thanks!

see all

All Comments (34)

Sign In or Sign Up now to post a comment!
  • just something to point out, never set your session to the persons username. People can change the session to the admin account and gain admin access

  • This dont work.

  • @FrightBeatZ

    Replace your code with " if(isset($_POST['login'])) " I don't know what type of browser embedded coding they have in United Kingdom, London but it work for Alex.

  • On my Browse login varrable"if($_POST['login'])" on top of code is undifined.

    error message say: Undefined index: login in C:\xampp\htdocs\Magento\login.­php on line 7

  • thankssssssssssss

    very much

  • Alex!

    I am using md5 hash encryption as shown in this awesome tut however I am getting a funny glitch where even if the password is correct the code is still gives die(incorrect username and password).

    If I drop the md5 hash encryption in both the signup and registration codes the code works correctly and sends the user to userarea,php

    what could it be!

  • Hey Alex, im getting this:

    Notice: Undefined index: login

    its at the beginning of the if at: if ($_POST['login']){...};

    but youve got the same code and did'nt got an error - can you tell me how to refuse this? ( hope you understand - english is not my best subject in school :D )

    Thanks for your really awesome tutorials =)

    Sincerely from Germany

    Fright BeatZ

  • ahmm, u know how to put a chat box on your website?

    cause as of now, im working with my project SNS, social networking site,

    can u help me pls?? :(

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more