Workflow
CREATE DATABASE contacts;
USE contacts;
CREATE TABLE contact_list (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50) NOT NULL,
phone VARCHAR(20) NOT NULL
);<!DOCTYPE html>
<html>
<head>
<title>Add Contact</title>
<style>
input[type=text], input[type=tel] {
margin-bottom: 10px;
padding: 5px;
font-size: 16px;
border-radius: 5px;
border: none;
border: 1px solid #ccc;
width: 100%;
box-sizing: border-box;
}
input[type=submit] {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
a {
color: #4CAF50;
text-decoration: none;
}
</style>
</head>
<body>
<h2>Add Contact</h2>
<form action="process.php" method="POST">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="phone">Phone:</label>
<input type="tel" id="phone" name="phone" required>
<input type="submit" value="Add Contact">
</form>
<br>
<a href="show.php">show Contact</a>
</body>
</html>
Last updated