registration successful message in php

Today we will talk about registration successful message in php. Displaying a notification after a successful registration is extremely important because it lets us know whether our program works well or not. I also provide source code after this article. Therefore if you are not skillful in PHP or you want to edit this source code, you just need to download the code at the end of the article.

Registration successful message in php

PHP is a popular programming language that is loved by lots of people. It also is the language used to create many opening source codes such as Prestashop, Magento, WordPress, etc. PHP in general and source codes include the registration part. Registration successful message in php works depending on the process of the project. Today we give you a simple notification demo.


  • Using hosting or server localhost, you could use xampp or similar software that you need.
  • Code editor software, you could use familiar software such as notepad++


We start checking the data. During the registration process, if saving the information of the form to the database is successful, there will be a notification for customers to know they have completed registering. About the displaying content, it may be a thanking or others, you just need to edit texts.

Firstly, we create a database which I name “test”. We add table and fields to the database. If you hesitate to do this, you could copy the following code and paste it into sql.

USE `test`;
`username`varchar(30) NOT NULL,
`password`varchar(30) NOT NULL,
`name`varchar(255) NOT NULL,
`email`varchar(255) NOT NULL,
$conn = mysqli_connect('localhost','root','','register') or die("cannot connect to database");
mysqli_query($conn,"SET NAMES 'UTF8'");
if (isset($_POST["btn_submit"])) {
$username = $_POST["username"];
$password = $_POST["pass"];
$name = $_POST["name"];
$email = $_POST["email"];
if ($username == "" || $password == "" || $name == "" || $email == "") {
echo "Please enter your infomation";
$sql="select * from users where username='$username'";
$kt=mysqli_query($conn, $sql);
if(mysqli_num_rows($kt)  > 0){
echo "Account is exits";
$sql = "INSERT INTO users(
echo "you have registered";
<form action="#" method="post">
<td colspan="2">Form register</td>
<td>Username :</td>
<td><input type="text" id="username" name="username"></td>
<td>Password :</td>
<td><input type="password" id="pass" name="pass"></td>
<td>Full name:</td>
<td><input type="text" id="name" name="name"></td>
<td>Email :</td>
<td><input type="text" id="email" name="email"></td>
<td colspan="2" align="center"><input type="submit" name="btn_submit" value="register"></td>
width: 300px;
margin: auto;
margin-top: 112px;
border: 1px solid #cdcd;
padding: 10px;

You should input the right information so that the notification can be displayed. You could check in the database. Below is the written data. Because this is the demo, I do not encode the data. When you apply this to the practical project, you are provided with some functions to encode such as md5, sha, etc by PHP for the purpose of customers’ safety.

Registration successful message in php

We have finished the article which is about Registration successful message in php. The issues related to custom fields,create input, create recaptcha as well as form are interested by many people. PHP language and other programming languages newbies should pay attention to this issue.

date of birth in php form

How to use date of birth in php form is the issue that many people are confused when using this programming language. With the forms related to personal information, there are many cases that forms include date of birth information.

date of birth in php form

If we use textbox to input date of birth, data must be checked. If users enter text, special characters or a number bigger than 31, there must have a notification that the input is invalid. Commonly, we use javascript to process the data.

In order that users do not input text or special characters, you could use type=number limited from 1 to 31.

There are many systems using dropdown for the purpose of importing date. With dropdown, users do not have to enter information but choose one date in the list of dates displaying. It must be sure that data displays properly. For example, there is no 30th or 31th in February.

Using the types of input like the two above, you need to identify data and calculate properly as well. This will costs you a lot of time. There is one type that incurs less error but is more visible. It is date picker. Thanks to date picker, using date of birth in php form is not a big problem anymore.

You could use the following example to see if date picker can make your project simpler.

<!doctype html>
<html lang="en">
<metaname="viewport"content="width=device-width, initial-scale=1">
<title>jQuery UI Datepicker - Default functionality</title>
<link rel="stylesheet"href="//">
<link rel="stylesheet"href="/resources/demos/style.css">
$( function() {
$( "#datepicker" ).datepicker();
} );
<p>Date: <input type="text"id="datepicker"></p>

We have run through the article date of birth in php form. If you have any feedback about the article, or you want to know more about form builder and how to save a form to the database, please read the next article, or contact us for support.

Enjoy this blog? Please spread the word :)