-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinquiry.php
144 lines (138 loc) · 4.63 KB
/
inquiry.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
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
<?php
session_start();
include_once("api/wellness.php");
$obj = new wellness();
$message = '';
if(isset($_POST['submit']))
{
$data = $_POST;
unset($data['submit']);
$data['user_ip'] = $_SERVER['REMOTE_ADDR'];
$data['dob'] = Date('Y-m-d',strtotime($data['dob']));
if($obj->insert('inquiry',$data) != 0);
{
$_SESSION['message'] = "Inquiry Submited successfuly.";
header("Location:inquiry.php");
}
}
else
{
if(isset($_SESSION['message']))
{
$message = $_SESSION['message'];
unset($_SESSION['message']);
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Wellness Education Consultancy</title>
<?php
include_once("template/css.php");
?>
</head>
<body>
<?php
include_once("template/header.php");
?>
<!-- Page breadcrumb -->
<section id="mu-page-breadcrumb">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="mu-page-breadcrumb-area">
<h2>Inquiry</h2>
<ol class="breadcrumb">
<li><a href="#">Home</a></li>
<li class="active">Inquiry</li>
</ol>
</div>
</div>
</div>
</div>
</section>
<!-- End breadcrumb -->
<!-- Start contact -->
<section id="mu-contact">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="mu-contact-area">
<!-- start contact content -->
<div class="mu-contact-content">
<div class="row mu-contact-left">
<?php
if(!empty($message))
{
?>
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Success! </strong><?php echo $message; ?>
</div>
<?php
}
?>
<form method="post" class="contactform" action="inquiry.php">
<div class="col-md-offset-3 col-md-6 jumbotron">
<div>
<div >
<h2 class="text-center">Inquiry form</h2><br/>
<p class="comment-form-email">
<label>Student's Name <span class="required">*</span></label>
<div class="inner-addon left-addon"> <i class="glyphicon glyphicon-user"></i>
<input type="text" class="form-control" name="student_name" placeholder="Enter your name" required>
</div>
</p>
<p class="comment-form-author">
<label>Course Interested <span class="required">*</span></label>
<select name="course_id" class="select form-control" required>
<option value="">Select Here</option>
<?php
$course = $obj->select('course');
foreach ($course as $key => $value)
{
echo "<option value=".$value['id'].">".$value['name']."</option>";
}
?>
</select>
</p>
<p class="comment-form-url">
<label>Mobile No. <span class="required">*</span></label>
<div class="inner-addon left-addon"> <i class="glyphicon glyphicon-phone"></i>
<input type="text" class="form-control" name="mobile_no" placeholder="Enter mobile number" required pattern="[0-9]{10}" title="Mobile Number must be 10 Charector">
</div>
</p>
<p class="comment-form-url">
<label>Email</label>
<div class="inner-addon left-addon"> <i class="glyphicon glyphicon-envelope"></i>
<input type="email" class="form-control" name="email" placeholder="Enter your email">
</div>
</p>
<p class="form-submit">
<input type="submit" value="Submit" class="btn btn-primary" name="submit">
</p>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- end contact content -->
</div>
</div>
</div>
</div>
</section>
<!-- End contact -->
<?php
include_once("template/footer.php");
?>
<?php
include_once("template/script.php");
?>
</body>
</html>