Now that we gathered all the data, we need to store it into the database.

Here is how we save the form submission to the database.

After logging in, we make sure that the table is existing.(If not, the script will create the required table).

Then we make sure that the username and email are unique.

We send an email to the user requesting confirmation.

Then we intimate the admin that a user has registered.

We are going to walk you through every aspect of creating a membership based site, with a secure members area protected by password.

The whole process consists of two big parts: user registration and user authentication.file in a text editor and update the configuration. In order to create a user account, we need to gather a minimal amount of information from the user.(Database login, your website’s name, your email address etc). We need his name, his email address and his desired username and password.Then we collect and ‘sanitize’ the form submission data (always do this before sending email, saving to database etc).The form submission is then saved to the database table.We use the free PHPMailer script to send the email.