How to make a connection form ?

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 stage of a member’s life

The first step will be to create the MySQL table (on phpMyAdmin) that will store the members who will register on the form.

Member’s page

What characterizes a member? Let’s try to see what we need to store at least to create the tablen :

  • Pseudo
  • Password
  • Email

You can, of course, add other fields such as age or date of birth.

Creation of the phpMyAdmin table

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)

Functionning of « password_hash »

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.

Database Connection

This is how to connect your database

Creation of the main pages of the member’s area

Register page

The registration page usually consists of four fields:

  • Desired pseudo;
  • Password ;
  • Password confirmation (to avoid typing errors) ;
  • Email address.
Registration page

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 :

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *