Login System Tutorial with PHP and MYSQL Database




PHP login system tutorial, using MySQL database and sessions, which includes registration, login, log out, and reset password functionality. Download source …

Original source


32 responses to “Login System Tutorial with PHP and MYSQL Database”

  1. So frustrated. Can anyone help? I changed something (I don't know what) and I cannot make it go to the Sign Up portion of the form (only Login). When I click on Sign Up, It will not change! How can I fix it???

  2. When I register a "user" (still testing), it sends the email confirmation and asks me to log out, as in the video. However, if I don't log out and open another tab to my site, it does not prevent me from seeing protected content (even without confirming the email). It's just the fact that I registered the name in the database that lets me in. How do I fix that? Anyone know? UPDATE: Arihant Bedagkar RESOLVED my issue! Thank you Arihant!

  3. Nice Work Buddy! I like your css styling, I have modified your code and added an extra option in profile.php of updating profile.

    btw, a small bug, when the user is already logged in and access index.php from another tab, it doesn't redirect to profile page as user is already logged in it shouldn't show them to login/register again

    so, i've added

    if ( isset($_SESSION['logged_in']) ) {
    header("location: profile.php");
    }

    at the start of index.php

    it works fine now! good job!

  4. Excellent video! Does this setup let you in the profile.php even if e-mail is not verified? What is the best way to enforce the e-mail verification before letting users enter the profile.php?

  5. I used PHPMailer and it works for me but I'm having a problem regarding on verify.php. Once I clicked the link on my email it says "Invalid parameters provided for account verification" although it is correct hash on my email

  6. Yet another issue: When a new user is logged in, instead of going to the "profile.php" with it echoing "Welcome "new user's name" email address and logout button", I want it to go to my existing index.php and say" Welcome user." [Logout] How do I do that?? Any help appreciated.

  7. Thanks for sharing this amazing video!! People like you who really teach others how to code. You explain everything in detail, and it shows that you have a clear understanding of your work. Keep doing this great job!!

  8. This video is freaking awesome! Thank you for producing and sharing this! I don't even know why YouTube allows thumbs/up down ratings for vids like this, it should be the option to click Like and that's it.

Leave a Reply