HTmL
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>A Sample Tutorial for Database Connection</title>
<style>
body {
background-color: #32e692;
font-family: 'Verdana', sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
width: 100%;
max-width: 500px;
padding: 20px;
background-color: white;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
color: #333;
margin-bottom: 20px;
font-size: 24px;
}
form {
width: 100%;
}
table {
width: 100%;
border-collapse: collapse;
}
td {
padding: 10px;
}
label {
display: block;
font-weight: bold;
margin-bottom: 5px;
color: #333;
}
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 14px;
margin-bottom: 15px;
box-sizing: border-box;
}
textarea {
height: 80px;
}
input[type="radio"] {
margin-right: 5px;
}
.submit-btn {
width: 100%;
padding: 10px;
background-color: #28a745;
color: white;
border: none;
border-radius: 5px;
font-size: 18px;
cursor: pointer;
text-align: center;
}
.submit-btn:hover {
background-color: #218838;
}
@media (max-width: 600px) {
.container {
padding: 10px;
}
h1 {
font-size: 20px;
}
}
</style>
</head>
<body>
<div class="container">
<h1>Details Entry Form</h1>
<form action="connect.php" method="Post">
<table>
<tr>
<td><label for="name">Enter Name</label></td>
<td><input type="text" id="name" name="Name" required></td>
</tr>
<tr>
<td><label for="email">Enter Email</label></td>
<td><input type="email" id="email" name="Email" required></td>
</tr>
<tr>
<td><label for="phone">Enter Phone</label></td>
<td><input type="tel" id="phone" name="Phone" pattern="[0-9]{10}" placeholder="3000000000" required></td>
</tr>
<tr>
<td><label>Service</label></td>
<td>
<input type="radio" name="Service" value="AC" required> AC
<input type="radio" name="Service" value="Electric"> Electric
<input type="radio" name="Service" value="Other"> Other
</td>
</tr>
<tr>
<td><label for="message">Message</label></td>
<td><textarea id="message" name="Message" rows="4" required></textarea></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="save" value="Submit" class="submit-btn">
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
Comments
Post a Comment