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.
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<style>
body{
padding:40px;
}
.container-one{
width:340px;
height:320px;
border:1px solid black;
padding-left:60px;
}
.btn {
margin: 5px;
}
</style>
</head>
<body>
<h3>Register:</h3>
<div class="container-one">
<form method="POST">
<div class="col-md-5">
First Name <input type="text" name="FirstName">
</div>
<div class="col-md-5">
Last Name <input type="text" name="LastName">
</div>
<div class="col-md-2">
Email <input type="text" name="Email">
</div>
<div class="col-md-3">
Password <input type="password" name="Password">
</div>
<div class="col-md-2">
City <input type="text" name="City">
</div>
<div class="col-md-2">
<input type="submit" name="Submit" value="Submit" class="btn">
</div>
</form>
</div>
</body>
</html>

<?php
$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);
}
?>
Output:
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.
ReplyDeleteGreat Article
DeleteCyber Security Projects for CSE Students
JavaScript Training in Chennai
Project Centers in Chennai
JavaScript Training in Chennai
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 updates.media training singapore
ReplyDeleteThanks for post:
ReplyDeletetu quan ao tren taobao
ao trung hoa tren taobao
order day chuyen tren taobao
Digital signatures have really improved the security level .To make the documents secure digital signature and encryption is the best way. And temperament is really not easy. Digital Signature Certificate
ReplyDeleteThanks for sharing the relevant information with us…It are good for us. Digital Signature Certificate
ReplyDeleteI highly admire your post. Thanks for sharing such wonderful information, I see your post very often and share them on all social media channels.
ReplyDeletePrivate detective agency in Mumbai
Thanks for posting such an informative article. Class 2 Digital Signature Certificate
ReplyDeleteThanks for such a continuous great postings. Apply Class 3 Digital Signature Certificate
ReplyDeleteI am very grateful you did share your knowledge here. It is an excellent post
ReplyDeletesharing this sort of educational posts. Class 2 Digital Signature Certificate
I really enjoyed reading your blog, you have lots of great content. Please visit here:
ReplyDeleteDigital Signature Certificate in Delhi