Registering users data and connecting to phpMyAdmin

The next task I set for myself was to register the user’s details after they sign-up and connect it to the database. Therefore, I had to create a separate php called register.php

register.php
Screen Shot 2015-04-14 at 19.18.34

To allow the data entered by the user in the sign-up form to transfer to the database in phpMyAdmin, I used the highlighted php code below. This query inserts the username, password, firstname, lastname, age, gender, university course, biography, smoker, hair, drinker, height and, eye colour into the database.Screen Shot 2015-04-14 at 19.22.27

The below data was entered on the sign-up form and then the register button is clicked.
Screen Shot 2015-04-14 at 19.26.12

To check if the data was then inserted into the users table, I logged into phpMyAdmin and browsed the users table and as you can see below all the data was transferred.Screen Shot 2015-04-14 at 19.26.55

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s