<!DOCTYPE html>
<html>
<head>
<title>SIGN UP</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<form action="signup-check.php" method="post">
<h2>SIGN UP</h2>
<?php if (isset($_GET['error'])) { ?>
<p class="error"><?php echo $_GET['error']; ?></p>
<?php } ?>
<?php if (isset($_GET['success'])) { ?>
<p class="success"><?php echo $_GET['success']; ?></p>
<?php } ?>
<label>Name</label>
<?php if (isset($_GET['name'])) { ?>
<input type="text"
name="name"
placeholder="Name"
value="<?php echo $_GET['name']; ?>"><br>
<?php }else{ ?>
<input type="text"
name="name"
placeholder="Name"><br>
<?php }?>
<label>User Name</label>
<?php if (isset($_GET['uname'])) { ?>
<input type="text"
name="uname"
placeholder="User Name"
value="<?php echo $_GET['uname']; ?>"><br>
<?php }else{ ?>
<input type="text"
name="uname"
placeholder="User Name"><br>
<?php }?>
<label>Password</label>
<input type="password"
name="password"
placeholder="Password"><br>
<label>Confirm Password</label>
<input type="password"
name="re_password"
placeholder="Re_Password"><br>
<button type="submit">Sign Up</button>
</form>
</body>
</html>
CREATE TABLE `register` (
`ID` int(10) NOT NULL,
`First_Name` varchar(100) NOT NULL,
`Last_Name` varchar(100) NOT NULL,
`Email` varchar(100) NOT NULL,
`Password` int(100) NOT NULL,
`File` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE DATABASE registration_form;
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`user_name` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `users` (`id`, `user_name`, `password`, `name`) VALUES
(1, 'admin', '202cb962ac59075b964b07152d234b70', 'admin'),
(2, 'user', '202cb962ac59075b964b07152d234b70', 'user');
<!DOCTYPE html>
<html>
<head>
<title>SIGN UP</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<form action="signup-check.php" method="post">
<h2>SIGN UP</h2>
<?php if (isset($_GET['error'])) { ?>
<p class="error"><?php echo $_GET['error']; ?></p>
<?php } ?>
<?php if (isset($_GET['success'])) { ?>
<p class="success"><?php echo $_GET['success']; ?></p>
<?php } ?>
<label>Name</label>
<?php if (isset($_GET['name'])) { ?>
<input type="text"
name="name"
placeholder="Name"
value="<?php echo $_GET['name']; ?>"><br>
<?php }else{ ?>
<input type="text"
name="name"
placeholder="Name"><br>
<?php }?>
<label>User Name</label>
<?php if (isset($_GET['uname'])) { ?>
<input type="text"
name="uname"
placeholder="User Name"
value="<?php echo $_GET['uname']; ?>"><br>
<?php }else{ ?>
<input type="text"
name="uname"
placeholder="User Name"><br>
<?php }?>
<label>Password</label>
<input type="password"
name="password"
placeholder="Password"><br>
>
<label>Confirm Password</label>
<input type="password"
name="re_password"
placeholder="Re_Password"><br>
<button type="submit">Sign Up</button>
</form>
</body>
</html