PHP Login System Reloaded v1.1

Here’s an updated version of the PHP Login System. You can check the old version here. The following was added: 1. Registration fields: email confirmation password confirmation country recaptcha Email confirmation and password confirmation are configurable fields. By default they are shown, but if you wish to remove one or both of them you have […]


PHP Login System

Here’s an updated version of the PHP Login System. You can check the old version here.

The following was added:

1. Registration fields:

  • email confirmation
  • password confirmation
  • country
  • recaptcha

Email confirmation and password confirmation are configurable fields. By default they are shown, but if you wish to remove one or both of them you have to set it in the file constants.php:

define("REPEAT_EMAIL",true);
define("REPEAT_PASSWORD",true);

2. Table fields:

  • the user ip,
  • number of logins of a user,
  • flag is_admin
  • flag is_blocked
  • new table – Country table

3. dbcontroller class sanitizes user input data

4. Edit Account Area

5. Admin Area – incomplete (for next version)

For now just the list of users is shown and a world map indicating where the users come from.  You can delete Users and set them as Admins. If there are no users to list, no map is shown. Also the User seeing the panel is not shown.
Note that in the demo you will not be able to see the admin part – for admin reasons :)

6. New CSS

7. Some other small details in the php code.

For the next version I am planning to :

  • add all admin functions
  • improve and improve ….

To use the recaptcha you need to get a public/private key here . Then you need to define them in constants.php:

define("PUBLICKEY","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
define("PRIVATEKEY","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

In order to use the demo for those who have registered in the previous version’s demo, you need to register again (in the demo login system), since I had to set up another database for it.

Hope you like it. Any suggestions or improvements are welcome!

DEMO

Download the source code here





Previous:
Next:

Tagged with:

Chadking is an absolute geek that rarely leaves the comfort of his 3-screen desk. He is a self taught programmer and is addicted to all possible legal drugs.

View all contributions by

Website: http://tympanus.net/codrops/author/chadking/

Related Articles

Feedback 287

Comments are closed.
  1. 1

    how would I go about deleting all the email aspects of the login form.. my hosting service doesnt allow emailing so that why I want to know how to disable it.. just like the email confirm thing and the forgot password email thing. plz help.

    hosting service: http://www.zymic.com

  2. 2

    Thanks for this great script. I am about to implement it on a site and was wondering if there is a newer version than 1.1?

  3. 3

    Hi Chadking,

    First of all …………….. great piece of work !

    I installed everything on a testsite, http://www.familiekant.nl/admin/ and it seems to work.

    When I fill in everything when I try to register, the error message pops up till I set everything allright.

    When I click on Register I see the Ajaxload image for a few seconds and than ………….. nothing ;-)

    No error message, no record in the database, no nothing.

    Any idea what goed wrong?

    Kind regards,

    Arie

  4. 4

    everyone is complaining that the php wont confirm their emails. can someone help, i’m a newbie …… please and thanks in advance

  5. 5

    Hi All!
    I am a novice in PHP.
    What should I do after logging in, the user arrive at my Main Page? If I modify the index.php,It seems on the login page also.
    Thanks!

  6. 8

    I am getting this Error when i run it in browser: {PHP Warning: session_start() [function.session-start]: open(./sessions\sess_nr1qi6k50l2fdrj0981gbvpkf2, O_RDWR) failed: No such file or directory (2) in D:\Domains\jmedsci.com\wwwroot\loginjqry\php\core.php on line 22 PHP Warning: Unknown: open(./sessions\sess_nr1qi6k50l2fdrj0981gbvpkf2, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (./sessions) in Unknown on line 0}

    Despite the fact that i gave it a location to save session….and i make the change in core.php file:
    public function __construct(){

    session_save_path(“./sessions”);
    session_start();

    }

  7. 9

    Really cool tutorial ! I have question what do you mean by

    “The only table that you have to create in your MySQL database is the following:”

    Please help answer back , I just started learning web development.

  8. 10

    A quick change that you might want to make is encoding the email for the password reset as rawurlencode, rather than urlencode, to avoid destroying + signs in email addresses (a perfectly valid character).

    Both changes would be made in the core.php file. In the functions confirmResetPasswordData() and processForgotPassword().

  9. 11

    Great PHP login script.

    How do I go about displaying a user’s profile after he or she has successfully registered and logged-in?

    Here, too, how would I display a user’s complete record (input data from a multi-page form)?

    Sure could use some help with the coding.

    Many thanks.

    Mary -

  10. 12

    Hey there,

    I’m a newb to php and am attempting to put together my own game project.

    I was directed to this page and I downloaded it but, to be honest, I have no idea where to even begin using this. lol

    Any help would be appreciated!

Comments are closed.