PHP best & secure user registration with login example

This example is explaining how to create secure user registration using php and mysql.This is very secure using salt value into database users table.It help to avoid sql injection and dictionary attack from hackers. This way is secure and better than md5 encryption method.
Here tested code.
This is have two parts.
1-User Registration
2-User Login

1-User Registration

From here everything is explained very simply to understand all visitors.
Here is the registration form.

To more simple I’ll show the table structure.
secure user login table
Users Table.

Here is the php script to process the form.This can put in the same registration.php file.
I have not added database connection details here.Hope you can create that.If you don’t know that let me know.I’ll add.


2-User Login

This is the login form.

You can put this script in the login.php same as registration.

That’s only. Hope everything are clear and understandable. If you have any questions,suggestions put the comment below.Appreciate and glad to help you. 🙂
Thank you.