From our sponsor: Elevate all your marketing with Mailchimp Smarts.
Update: There’s a new version of this Login Script.
Here’s a PHP Login System, based on the one developed by jpmaster77: PHP Login System with Admin Features
Focusing only on the core functionalities and aimed to improve certain parts of the code, I took out some functionalities and added some others:
Removed:
- Admin features
- Active guests, active users, banned users
- Global variables
- Links to other pages after the login
All these can be easily reintegrated if you want. I focused on the login and registration part, leaving out the content “inside”.
Added:
- PHP 5 instead of PHP 4
- mysqli extension
- Send registration confirmation link to the email address
- Reset password feature without sending password to the email. Instead a link is sent to reset the password
- UTF8 support
- InnoDB transactions for database operations
- Registration and form validations made with AJAX
- jQuery
- Captcha image in registration form to avoid spam
Here are the most important settings for the installation of the login system.
Set database access in constants.php:
define("DB_SERVER", "localhost"); //type mysql server url define("DB_USER", "XXXXXXX"); //type mysql user define("DB_PASS", "XXXXXXX"); //type mysql password define("DB_NAME", "XXXXXXX"); //type mysql database name
Further, you have to set the right location of the following files for the mail sending functions:
define("RESETPASSWORDLINK","http://www.tympanus.net/loginsystem/resetpassword.php"); define("CONFIRMACCOUNTLINK","http://www.tympanus.net/loginsystem/php/confirm.php");
The only table that you have to create in your MySQL database is the following:
CREATE TABLE users( pk_user int unsigned not null auto_increment, email varchar(120) not null, flname varchar(100) not null, password varchar(64) not null, usr_signup_date timestamp not null default CURRENT_TIMESTAMP, usr_userid varchar(32), # for the account confirmation: usr_confirm_hash varchar(255) not null, # after confirming its set to 1: usr_is_confirmed tinyint(1) not null default 0, # when the user resets password (forgot password): usr_resetpassword_hash varchar(255) not null, unique index(email), primary key(pk_user) )type=innodb DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
I will soon post a new version, as I am currently improving some points.
See a demo here: PHP Login System Demo
You can download the source code here: PHP Login System ZIP
hi
I try to use this script (only the php actions) on my site.
root->-index.html
->/login (your script)
I can put the forms in my site, but when i press login, he redirect to the register page, and I cant login.
is it also possible to register without mail, but with a master password? (so I need to give a pass before they can register?)
thanks, any info is welkom
HI! The script is incredible.
The only problem i have is to make captcha part working at the registration form!
Is anybody have any idea what might be wrong? I would kindly appreciate any help!
Hello. I just started configure this script pack, hope it will work perfect!
@ Elena, you should define your problem and i’m sure they will help you out:)
Free unlimited host offer active at dawnforged.com be quick!
guys, why not using the updated version of this script? The captcha there is much better!
cheers
who can help me to put his login script into my website?:(it.s really good,but i don.t now how i can install him!if anibody can help me,add me to yahoo. dddimoncic ths a lot!
Hi! It’s possible for one to submit for values to email address?
If it’s possible let me know. my email is dkess15@gmail.com. I’m just learing php.
THanks
What i actualy mean is that, submited values that came from form textbox and so on, I want to use to get submited forms data to email address without having a database.
I need guild on it pls
Expecting…
hello,
seem to get a jquery problem, when hitting register button, the green ajax status bar keeps flashing infinitely although the registration data is being recorded to sql tables correctly, but the green status bar just does not disappear and keeps flashing…hope that’s not too confusing…i wonder what could be the cause of the problem. thanks!
I have created another field in the users database called ‘userid1’ and set it to autoincrument.
I would like to make this available to when the session starts so that I can track my users.
how can I do that so it is available for me to see like their user name.
cheers and thanks for your great work
Helo. I have a problem. In the registration and “password forget” if i click to the “Register” or “Send” button, nothing happen. Only the ajax loader image plays again and again. Not show an error or go a next page. Why. Here my registration button part:
Back
Registration
Please help 🙂
Here the site:
http://relay.jp22.net/public_index.php
I tried using the demo and it appears that the captcha image is broken.
Hey Chad,
thanks for the great login system. I installed everything correctly (I’m pretty sure) and I get “an error ocurred bla bla we should put a message for this”. This occurred right after I pressed ‘Register”. I checked the code and found the error trap in ‘register.php’, but in looking at the ‘else if’ statement, can’t make sense of the ‘data.result == “-2”. Any help please? Thanks again
Everybody must know that the submit button can not work on testing server that is not connected to the internet. And if a user is manually entered into the table the sha1 in the core.php where the _login() function is called should be removed if not you will be having “invalid password” message.
Hello! Tell how to change please the coding of outgoing letters with utf-8 on windows-1251?