Limited offer!

Get a huge collection of PHP scripts in a special bundle!

Mega Sale Price


With our free user login script.

- MySQL is used to store the user database.
- You can define custom messages to each user upon login.
- Add nice and clean login form to your website.

Review the Demo to test the PHP User Login Script. Use the following details to log in:

password: pass


password: pass

Download the Simple PHP Login Script for FREE. Note you need to be logged in to download the user login script.

Also, check our fully supported Member Login Script.


To download Simple PHP User Login Script for FREE you need to login your account.

how to install

Follow these steps to run the PHP User Login Script:

1) open database.sql and import all the MYSQL queries in your database. There are two demo users which you can delete.

2) edit options.php file and set MySQL login details to connect to your database

3) using your web browser open index.php page which will show the login form.

Special Offer!

Get all 65 PHP scripts in a bundle for $4.29 each only!

Mega Sale Bundle Price
398 Comments to "Simple PHP User Login Script"
  • Matt Does Stuff

    Matt Does Stuff

    December 30, 2019 at 21:53 pm

    I cannot get anything other than error 500. The database script is fine, the config file is set. But the index.php throws an error 500. Using nginx web server.

  • Jaspreet Singh

    Jaspreet Singh

    December 10, 2018 at 15:32 pm

    I recently downloaded this free script but options.php file was missing in that zip folder without which script is of no use. please guide me what to do now

    • Prince Chike

      Prince Chike

      October 12, 2020 at 05:19 am

      They deliberately removed the "options.php" file to render the script unusable!

    • That guy

      That guy

      January 16, 2021 at 15:55 pm

      no, options.php is really config.php. It's a typo in the directions or they changed the name afterwards.
      It works just fine with only index.php and config.php but you have to create your table in the database, add user and edit config.php with those details for access.

  • Darpan Vadher

    Darpan Vadher

    October 10, 2018 at 20:43 pm

    Hey when I access index.php after login I have seen that by copying and paste the URL of index.php page to another explorer, the page opens succesfully without the need to do the logging process. So any Solution of it....
    #request # help me

  • Clone Script

    Clone Script

    August 7, 2018 at 09:18 am

    yes same simple login form it was very useful one... but login takes some error..

  • Robert Mallett

    Robert Mallett

    December 4, 2017 at 13:18 pm

    Doesn't work with php 7

    • Robert Mallett

      Robert Mallett

      December 4, 2017 at 14:42 pm

      I tried changing mysql_connect by mysqli_connect and same for mysql_select_db to mysqli_select_db($connection, database)

      but I then get

      Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in /home/linweb17/s/ Stack trace: #0 {main} thrown in /home/linweb17/s/ on line 64

    • gdu


      December 4, 2017 at 14:45 pm

      Thank you for your information...
      If it is here it is that the maintainer thinks it is still worth leaving it here.

      Please check comments before posting...
      for example, check: October 4, 2017 at 12:53 pm

  • gehad


    December 3, 2017 at 19:27 pm


  • Mark Pulsinelli

    Mark Pulsinelli

    October 23, 2017 at 19:42 pm

    'Hi, this is great and was really easy to implement. Just one question, what php code do I need to put on the pages I want to require login for.

    • Andrew Barrington

      Andrew Barrington

      October 24, 2017 at 10:50 am

      Good luck getting this answer, it has been asked many times with no reply :(

    • gdu


      October 24, 2017 at 11:50 am

      This is because you need to read the code... and understand what it does.

      Here is what I did:

      <?php if(isset($_SESSION['user_info']) && is_array($_SESSION['user_info'])) { ?>
      <div id="form-content">
      <?php include("pagesvideos.php"); ?>

  • Nyle


    September 4, 2017 at 16:16 pm

    Personally I tried almost few hours to work with this, but for me never worked. "Unable to connect to MySQL server. Please make sure your MySQL login details are correct."
    May be this error because of I am very new To PHP. :(, if anyone can list the clear step by step will help very much. Thank you

    • gdu


      October 4, 2017 at 12:53 pm

      Using PHP7?.... change mysql_connect by mysqli_connect and same for mysql_select_db to mysqli_select_db($connection, database)

  • Patrick


    August 31, 2017 at 05:19 am

    Very nice script. Very helpful and free : )

  • Php Freelance Developer

    Php Freelance Developer

    August 4, 2017 at 15:35 pm

    Nice one. This was so easy to follow and exactly what I was looking for.



Add your comment