The MySQL Table
First of all we have to setup a database and a table. For this tutorial I chose to use a database named “login”. You can feel free to use whatever database and table name you want to on the condition that you make sure to change it in the config.php file. The SQL for the user registration and login system is really basic and straight forward:
1 2 3 4 5 6 7 | create table users ( uid INT NOT NULL auto_increment, username varchar(20) NOT NULL, password char(40) NOT NULL, primary key(uid), unique(username) ); |
Since this is a simple tutorial I made the MySQL table simple. Basically we just have a Username and Password with the user id field. The simple table structure should serve as a template for you to integrate into most scripts.

Thanks!
Thanks, very useful for a beginning php scripter,
i’m gonna use it and expand with other fields!
Very useful and straight to the point! Thanks for this.. it got me up and running in the space of 10 minutes
codes send me
it is very useful,thanks a lot!