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 […]

From our sponsor: Prepare for advanced communication roles and earn your Northwestern master’s degree online.


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

Tagged with:

chadking

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.

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

Stay up to date with the latest web design and development news and relevant updates from Codrops.

CSS Reference

Learn about all important CSS properties from the basics with our extensive and easy-to-read CSS Reference.

It doesn't matter if you are a beginner or intermediate, start learning CSS now.

Feedback 287

Comments are closed.
  1. What a great script even me without knowledge of php have it working. Thank you very much.

    I found my mistake and I have now the “flname” on the login page.

    I like to know or it is possible to put this “flname” also in other html pages..

    Thanks in advance
    Raymond

  2. does anyone know how to add additional levels to the script???? as in right now it has 2 levels being a member and a admin…..wanting to add other levels or ranks however you want to say it thanks in adanced

  3. i have a question,
    i have upload it on my website,
    but in the index.php display this error,what can i do?
    Thx

    Warning: require_once(../php/core.php) [function.require-once]: failed to open stream: No such file or directory in /home/dreascom/domains/dreamz-bbs.com/public_html/php2/public_index.php on line 2

    Fatal error: require_once() [function.require]: Failed opening required ‘../php/core.php’ (include_path=’.:/usr/local/lib/php’) in /home/dreascom/domains/dreamz-bbs.com/public_html/php2/public_index.php on line 2

  4. I have everything working with the login script except one little issue.
    When I try and register all of my information the the scrolling ajax image just scrolls forever and I can not insert data into my database or send emails.
    I have inserted the information in manually to the database and I can log in.
    Thanks ChadKing

  5. Hi,i have a problem. I can’t run it on my localhost. When I try and register all of my information the the scrolling ajax image just scrolls forever,it can not send emails.But I can insert data into my database.
    i am using xampp software, is anything i should set it?
    can you help me?

  6. Hi Chad,
    Thanks for this script.
    I have tried this script on localhost and two different web hosting.
    first time using this script, I got some problems, such as sending email. but now everything works 100%. 🙂

  7. hi Yason ,
    can you tell me how to solve the e-mail problem in localhost?
    thank you!

  8. It took an quick look at your demo and it seems that the country select list is not showing even though I have typed enough words in the form. Maybe you can take an look at it when you have some time, I’m using Mozilla Firefox 3.6.3 on Windows 7 , take care \m/

  9. Hi Chadking,

    thx for great script! Simple question – if you are thinking about new version of login reloaded when we can expect it ?

  10. Hello Chadking,

    I’m using your product and I think it’s a very useful application for security, thanks a lot for let us prove it.

    I’d like to know if it’s possible to:

    1. Trace the date and time when users logged in the login system.
    2. Define or limit the users concurrent connections in the application.

    Thanks a lot for your time.

    Regards,

    Alejandro.

  11. Hello Chadking,

    I’m using your product and I think it’s a very useful application for security, thanks a lot for let us prove it. I’d like to know if it’s possible to:

    1. Trace the date and time when users logged in the login system.
    2. Define or limit the users concurrent connections in the application.

    Thanks a lot for your time.

    Regards,
    Alejandro.

  12. Parse error: syntax error, unexpected ‘}’ in D:\xampp\htdocs\login1\register\index.php on line 100

    please help,im also a newb with phpmysql

  13. Great job CHADKING, love this reloaded system, I am going to give it a very good use.

    BTW, when are you planning on releasing the next version?

  14. Could anybody give me a hand with these next things:

    1. I want to add a phone number field
    2. I want to use this login system, as a event registration form and adding a pay module (very important), remove the password utility, use the admin functions to see the users that payed/joined/etc..

  15. Hi chad

    if you dont mind could you please let me know which files to use if i wanted to use this login system to work together with my other system lets say an inbox, blog, or chat, that is if i want to use the same username althrough, how do i name the sessions and which files do i use for this to be integrated? or anybodyelse who has an idea. pls help thanks.

  16. important remark concerning utf-8, there is a bug in the dbcontroller.php that causes reading ???? instead of the name coded in a strange language,
    to overcome it add the following

    mysqli_query($this->link,”SET NAMES ‘utf8′”);

    after

    public function dbgetUserAccountDetails($userkey){

    $q = “SELECT U.*,C.country_name FROM users U,Country C WHERE U.pk_user = ‘$userkey’ AND C.country_code = U.country_code”;

    enjoy and thanks for this great script!

  17. Hey, first sorry for my bad english :).

    My question:

    Can i deactivate the email confirm ?

    also when the users register, then they can after registering , log in?

    Greeting 0grish