php (35) javascript (31) phpjavascript (30) jquery (23) html (20) mysql (14) database (9) codeigniter (4) json (4) bar chart (2) calendar (2) column chart (2) framework (2) google maps (2) query (2) tables (2) url (2) dropdown (1)

Thursday, February 15, 2018

Simple User Registration Form Using PHP, MySQL

In this tutorial, I am illustrating a simple user registration form. register form is a common need in any kind of web-based application so here is register form using PHP, MySQL, HTML, and CSS.


    <link rel="stylesheet" href="">
            border:1px solid black;
        .btn {
            margin: 5px;



<div class="container-one">
    <form method="POST">
        <div class="col-md-5">
            First Name <input type="text" name="FirstName">
        <div class="col-md-5">
            Last Name <input type="text" name="LastName">
        <div class="col-md-2">
            Email <input type="text" name="Email">
        <div class="col-md-3">
            Password <input type="password" name="Password">
        <div class="col-md-2">
            City <input type="text" name="City">
        <div class="col-md-2">
     <input type="submit" name="Submit" value="Submit" class="btn">

$DatabaseServer = "localhost";
$DatabaseUsername = "root";
$DatabasePassword = "root";
$DatabaseName = "demo";

$Connection = mysqli_connect($DatabaseServer,
 $DatabaseUsername, $DatabasePassword, $DatabaseName);
if ($Connection === false) {
    die("ERROR: Could not connect. " . mysqli_connect_error());
if (isset($_POST['Submit'])) {
    $FirstName = $_POST['FirstName'];
    $LastName = $_POST['LastName'];
    $Email = $_POST['Email'];
    $Password = $_POST['Password'];
    $City = $_POST['City'];
    $SQL = "INSERT INTO user 
(FirstName, LastName, Email, Password, City) 
VALUES ('$FirstName', '$LastName', '$Email', '$Password', '$City')";
    $result = mysqli_query($Connection, $SQL);


  1. Welcome to the Best writer Review, Here you can get the best All Assignment Help review sites. We strongly urge you to check our entire website once and we will assure you will find this review website very useful. Our hard work will be rewarded if students like you will appreciate our effort and spread the message about this site with your class-fellows and friends.

  2. Easily, the is clearly the very best topic on this registry related issue. I participate in your conclusions and will eagerly look forward to your following updates. Just saying thanks won't you need to be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to remain informed of any training singapore


More Posts