-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_appoinment.php
More file actions
40 lines (33 loc) · 1.19 KB
/
Copy pathadd_appoinment.php
File metadata and controls
40 lines (33 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
include 'db.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$client_name = $_POST['client_name'];
$service = $_POST['service'];
$appointment_date = $_POST['appointment_date'];
$appointment_time = $_POST['appointment_time'];
$conn->query("INSERT INTO appointments (client_name, service, appointment_date, appointment_time) VALUES ('$client_name', '$service', '$appointment_date', '$appointment_time')");
header('Location: index.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Add Appointment</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Add New Appointment</h1>
<form method="POST">
<label for="client_name">Client Name:</label>
<input type="text" name="client_name" required>
<label for="service">Service:</label>
<input type="text" name="service" required>
<label for="appointment_date">Date:</label>
<input type="date" name="appointment_date" required>
<label for="appointment_time">Time:</label>
<input type="time" name="appointment_time" required>
<button type="submit">Add Appointment</button>
</form>
</body>
</html>