-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
76 lines (67 loc) · 3.21 KB
/
index.php
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
session_start();
if (isset($_SESSION['password'])) {
?>
<?php require('header.php') ?>
<!DOCTYPE html>
<html>
<head>
<title>Salon Coiffeur</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-6 mt-5">
<h2 class="text-center mb-4">Salon Appointment</h2>
<form method="post" action="process_order.php">
<div class="form-group">
<label for="name">Name:</label>
<input type="text" class="form-control" id="name" name="name" required>
</div>
<div class="form-group">
<label>Type Soin:</label>
<div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="soinVisageCheckbox" name="typeSoin[]" value="soin visage">
<label class="form-check-label" for="soinVisageCheckbox">Soin visage</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="vernisCheckbox" name="typeSoin[]" value="vernis">
<label class="form-check-label" for="vernisCheckbox">Vernis</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="chauveauCheckbox" name="typeSoin[]" value="chauveau">
<label class="form-check-label" for="chauveauCheckbox">Chauveau</label>
</div>
</div>
</div>
<div class="form-group">
<label for="prix">Price:</label>
<input type="text" class="form-control" id="prix" name="prix" required>
</div>
<div class="form-group">
<label for="date">Date Soin:</label>
<input type="date" class="form-control" id="date" name="date" required>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</form>
</div>
</div>
</div>
</body>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</html>
<?php
if (isset($_SESSION['success_message'])) {
echo '<script>alert("' . $_SESSION['success_message'] . '");</script>';
unset($_SESSION['success_message']); // Clear the success message
}
?>
<?php
} else {
header('location:login.php');
} ?>