What are the functionalities of a member area ?
Who has never created an account on Twitter or any website ?
You’ve probably seen a members’ area before, even if the website doesn’t call it exactly that.
So you should know that a members’ area requires at least the following elements:
- Registration page
- Login page
- Logout page
The first step will be to create the MySQL table (on phpMyAdmin) that will store the members who will register on the form.
What characterizes a member? Let’s try to see what we need to store at least to create the tablen :
You can, of course, add other fields such as age or date of birth.
If you followed correctly, it should look like this. Make sure you have ticked “A_I” and selected PRIMARY (the golden key next to “id”) on the Index column.
How to see the password in mode « not clearly » in the database (facultative content)
Do not use sha1 , md5 , sha256 , sha512 because they are no longer considered secure hash functions today… Use instead password_hash which is chosen in the recent code.
This is how to connect your database
Creation of the main pages of the member’s area
The registration page usually consists of four fields:
- Desired pseudo;
- Password ;
- Password confirmation (to avoid typing errors) ;
- Email address.
Fill the fields and if you look in the database you will see that there is your username, your password and your mail.
If everything is completely correct, the fields, in phpMyAdmin are filled and it’s look like this :