-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbookingform.php
More file actions
153 lines (105 loc) · 4.12 KB
/
bookingform.php
File metadata and controls
153 lines (105 loc) · 4.12 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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
require("functions.php");
$booking = new Booking();
$msg = "";
$values = "";
if (isset($_POST['booking'])) {
$intention = $_POST['intention'] ?? "";
$package = $_POST['package'] ?? "";
$fullname = strip_tags($_POST['fullname']) ?? "";
$contact = trim($_POST['contact']) ?? "";
$location = strip_tags($_POST['location']) ?? "";
$experience = $_POST['experience'] ?? "";
$studentArray = [
'intention' => $intention,
'package' => $package,
'fullname' => $fullname,
'contact' => $contact,
'location' => $location,
'experience' => $experience
];
// send email
$booked_user = $booking->registerApplicant($studentArray);
if ($booked_user) {
$msg = '<div class="alert alert-success" role="alert">Booking successful</div>';
// $email_sent = $booking->sendEmail($event_name,$event_date,$guest);
// if ($email_sent) {
// $msg = '<div class="alert alert-success" role="alert">Booking successful</div>';
// }else {
// $msg = '<div class="alert alert-danger" role="alert">Booking failed</div>';
// }
}else {
$msg = '<div class="alert alert-warning" role="alert">Booking successful</div>';
}
}
?>
<div class="container booking_form">
<?php
if (isset($msg)) {
echo $msg;
}
?>
<h3>Register Now</h3>
<form method="post">
<div class="form-row">
<div class="col">
<div class="form-group">
<label>Do you intend to register the cause<span style="color: red; font-size: 20px;margin-left: 5%;">*</span></label>
<select class="form-control" name="intention">
<option>Select</option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
</div>
</div>
<div class="col">
<div class="form-group">
<label>Course Package<span style="color: red; font-size: 20px;margin-left: 5%;">*</span></label>
<select class="form-control" name="package" id="events" data-toggle="tooltip" data-placement="top" title="select event">
<option>Select</option>
<option>platinum</option>
<option>Gold</option>
<option>Diamond</option>
</select>
</div>
</div>
</div>
<div class="form-row">
<div class="col">
<div class="form-group">
<label>FullName<span style="color: red; font-size: 20px;margin-left: 5%;">*</span></label>
<input class="form-control" name="fullname" type="text" placeholder="FullName" required="required"
data-toggle="tooltip" data-placement="top" title="date">
</div>
</div>
<div class="col">
<div class="form-group">
<label>Contact<span style="color: red; font-size: 20px;margin-left: 5%;">*</span></label>
<input class="form-control" name="contact" type="text" placeholder="Contact" required="required"
data-toggle="tooltip" data-placement="top" title="guest list"></textarea>
</div>
</div>
</div>
<div class="form-row">
<div class="col">
<div class="form-group">
<label>Location<span style="color: red; font-size: 20px;margin-left: 5%;">*</span></label>
<input class="form-control" name="location" type="text" placeholder="Location" required="required"
data-toggle="tooltip" data-placement="top" title="date">
</div>
</div>
<div class="col">
<div class="form-group">
<label>Do you have experience in Forex<span style="color: red; font-size: 20px;margin-left: 5%;">*</span></label>
<select class="form-control" name="experience" id="events" data-toggle="tooltip" data-placement="top" title="select event">
<option>Select</option>
<option value="yes">Yes</option>
<option value="no">No</option>
<!-- <option>Diamond</option> -->
</select>
</div>
</div>
</div>
<button type="submit" name="booking" class="btn btn-default">Register Now</button>
</form>
</div>