-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
160 lines (146 loc) · 5.06 KB
/
contact.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?php
include('connection.php');
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MecBooksCart|Contact Us</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
.form-container {
display:table;
max-width:900px;
width:90%;
margin:0 auto;
box-shadow:100px 100px 100px 100px rgba(0,0,0,0.1);
}
form {
display:table-cell;
width:400px;
background-color:#ffffff;
padding:40px 60px 100px 60px;
color:#505e6c;
}
@media (max-width:991px) {
form {
padding:40px 40px 100px 40px;
}
}
form h2 {
font-size:30px;
line-height:1.5;
margin-bottom:30px;
}
form .form-control {
background:#f7f9fc;
border:none;
border-bottom:1px solid #dfe7f1;
border-radius:0;
box-shadow:none;
outline:none;
color:inherit;
text-indent:6px;
height:40px;
}
form .form-check {
font-size:13px;
line-height:20px;
}
form .btn-info {
/* background:#f4476b; */
border:none;
border-radius:4px;
padding:11px;
box-shadow:none;
margin-top:35px;
text-shadow:none;
outline:none !important;
}
form .btn-primary:hover, form .btn-primary:active, .btn-primary:active:hover {
background:#eb3b60;
}
form .already {
display:block;
text-align:center;
font-size:18px;
color:#6f7a85;
opacity:0.9;
text-decoration:none;
}
form .input-group-addon{
background:black;
color: white;
}
</style>
</head>
<body>
<!-- Navbar -->
<?php
include 'navbar.php';
?>
<div class="form-container">
<form name="contactForm" method="post" >
<h2 class="text-center"><i class="glyphicon glyphicon-send"></i> CONTACT US</h2>
<div class="form-group">
<b>Name :</b><br>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input type="text" class="form-control" placeholder="Enter your name" name="name" required>
</div>
</div>
<div class="form-group">
<b>Email :</b><br>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<input type="email" class="form-control" placeholder="Enter your email" name="email" required >
</div>
</div>
<div class="form-group">
<b>Mobile Number :</b><br>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-phone"></i></span>
<input type="tel" class="form-control" placeholder="Enter your mobile number" name="phone" >
</div>
</div>
<div class="form-group">
<b>Message :</b><br>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-comment"></i></span>
<textarea class="form-control" placeholder="Enter your message/query" name="message" rows="6" cols="25"></textarea>
</div>
</div>
<div class="form-group">
<button class="btn btn-info btn-block" name="signup" type="submit">Send</button>
</div>
</form>
</div>
<?php
if(isset($_POST['signup'])){
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$message=$_POST['message'];
$formcontent=" From: $name \n Phone \n Message: $message";
$subject="CONTACT FORM";
$mailheader="From: $email \r\n";
$recipient="[email protected]";
$recipient2="[email protected]";
// mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
?>
<script>
alert("Query submitted!");
</script>
<?php
}
?>
<!--Footer-->
<?php
include 'footer.php';
?>
</body>
</html>