DOCTYPE HTML-WPS Office
DOCTYPE HTML-WPS Office
DOCTYPE html>
<html>
<head>
<title>Registration Form</title>
<style>
body {
background-color: sky;
form {
width: 400px;
margin: 2 auto;
padding: 20px;
border-radius: 5px;
background-color: #fff;
label {
display: block;
margin-bottom: 10px;
input[type="text"],
input[type="email"],
input[type="password"]
width: 100%;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
</style>
</head>
<body>
<h2>Registration Form</h2>
<label for="name">first_ame:</label>
<label for="Id_no">Id_no:</label>
<label for="email">Email:</label>
<label for="Phone">Phone:</label>
<label for="Age">Age:</label>
<label for="department">department:</label>
<br>
</form>
</body>
</html>
<?php
$servername = "your_servername";
$username = "your_username";
$password = "your_password";
$dbname = "mis";
// Create connection
// Check connection
if ($conn->connect_error) {
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$id_no = $_POST['id_no'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$age = $_POST['age'];
$department = $_POST['department'];
$age = $_POST['sex'];
$sql = "INSERT INTO users (first_name, last_name, id_no, email, phone, age, department,sex) VALUES (?,
?, ?, ?, ?, ?, ?, ?)";
$stmt = $conn->prepare($sql);
if ($stmt->execute()) {
} else {
$stmt->close();
$conn->close();
?>
first_name VARCHAR(50),
last_name VARCHAR(50),
id_no VARCHAR(20),
email VARCHAR(100),
phone VARCHAR(20),
department VARCHAR(30),
age INT,
sex VARCHAR(6)
);