YOUR NEXT STEP

User Registration Form with PHP and MySQL Tutorial

ProgrammingKnowledge · 30 lessons · Free on YouTube

LESSON 18 / 30

PHP CRUD (Create, Read, Update, Delete) Tutorial with MySQL + Bootstrap 4 # PART 1

←Next

About this course

hey guys what's going on welcome to programming knowledge and into this lecture we're going to talk about how to create user registration for using your

PHP so this is a five video series and in this course we learn how to create this particular registration so we have the first name last name email address and phone number and of course the last

one password so the technologist that we're going to use are the following PHP MySQL we're gonna use the bootstrap for the front end of our user registration form and of course we're gonna use the

jQuery so let's go ahead and create our new project let us navigate to our localhost directory and create a new directory that will hold all the files necessary for our project so new folder

and let's name it user accounts and then inside this particular folder we're going to define few files for our project so let's define the index dot PHP okay

change extension yes and also let's define config dot PHP and also another one for our registration form so registration dot PHP so these files will be vital for our project config is for

the configuration for our database connection the index dot PHP will be displaying all the users registered and of course again the registration that PHP where in which our form or user

registration form will be displayed or located so now that we have the basic structure of our project let's go ahead and edit registration at the HP to create our

user registration form okay so now open up the registration net by HP and we have an empty file so all we have to do is define the HTML structure for this one so HTML and if you're using sublime

text you can just type in HTML and press tab in your keyboard okay so the title for this one is user registration in PHP so for now let's define our user registration form so we're just going to

define a very basic a very basic user registration form and later on we'll improve the front-end by using the bootstrap library so let's start with a div and inside this div let's define the

form and of course inside this form we could define a dip for our container and let's not forget to set the action for our form which is action and for now let's use the registration that page and

method let's use post method so under the container div let's define h1 and it should say registration ok and a paragraph that says fill up fill up the form with correct values think after

that one let's define an input with the input a keyword with the type tax and for the name let's make it or let's name it as name and of course let's define the

label for this one so label label for first thing so it should be hold with the keyword first name of course this first name should be required after that we could just copy and paste this line

so label for first name and input tax with a type or with the name first name so let's paste one for our last name for our email address for our phone number and for our password okay so let's

change this into last name this to last name and of course the name should be last name also this one is for email address so email and email pretty name or for the name of the input and phone

number phone number and also the label for the phone number lastly is the password so password and password pretty name and label for the password so let's change this input type into of

course we're using the password and of course we're using email for this Phil for email address so if we're done with that let's check our registration that PHP file in our browser so go on

with our browser and type in localhost and user account which is for our project name so user accounts and registration that PHP so we have here a very basic form or user registration

form and we can see that we're missing a button for our submit so let's define it in our registration that PHP file so input and then pipe submit and for the name is say for example parade okay so

the value for this one is sign up so save your file and let's go back to our browser and refresh our registration that PHP page so as you can see we have now the sign up button and the next step

for this one is to actually implement PHP for this user creation or user registration form so let's go back to our code and above this then let's create a new div and let's open up our

PHP tag inside this particular div and of course the first thing we're gonna need is to check if the users submitted the form all you have to do is type in the keyword estep and with the keyword

post and of course we're gonna need the name of the name of our submit button which is scrape and open curly brace and closed curly brace so for now let's just

check if the submit button is working let's ankle let's type in echo user submitted for us to check if the submit button is working so let's go back to our browser and refresh our page let us

see if the signup button is working okay we forgot that we defined the first name was required also with this one also with this one and so on so for now let's define values for this first name last

name sample values and password and for email address of course we need to set a valid email address and click on the signup button so as you can see users submitted is displayed meaning our

signup button or signup submit button is working so in the next tutorial we will continue working with this PHP code and let's work on with our database connection thanks

you

THERE IS ALWAYS MORE

Keep feeding your curiosity.

Explore more courses
From the community, for the community

Found a great course?

Share it. Our team will review it before adding it to the catalog.