User Registration Form in PHP and MySQL with Validation. By using this user can easily register, filling username, email, password fields, First name, Last Name, Gender and Teams and Condition Checkbox. After submitting the form, the data will be stored in a database table. So When next time user can login with the login credentials which are used while user registration.


Step to Create User Registration Form in Php and Mysql

  1. Create Database
  2. Creating table with six field.
    • id
    • urname
    • email
    • passwd
    • fname
    • gender
  3. Create Html File.
  4. Add Custom Css into html.
  5. Connect Database using php

That’s all.

Following is Step by Step Procedure to Create Php Registration Form

1. Create Database
  •  login to phpmyadmin, then click on Databases tab. And in the input field enter database name and click on create database button
2. Create Database Table
  • id is the primary key and auto incremented.
  • uname field use to store username in database.
  • email field use to store email address of your.
  • passwd field use to store user password.
  • fname Store User Firstname and Last name.
  • gender field store user gender like male of female.

Import this Code in your Sql Database

3.Create Registration.php File

Create this file with Registration.php file name and save this in the project root folder. In this file we also  add php code that is why we added php extention to this file. Add this code in your php file later we add custom style.

Import this Code into registration.php file.


 4. Create Css File Style.css

Now, Create Css file Style.css and save it in the project root folder. In this css file add classes are connect to html element so be careful when you change the html element.