-
Notifications
You must be signed in to change notification settings - Fork 0
/
contactus.php
78 lines (69 loc) · 3.05 KB
/
contactus.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
<?php
include "header.html"
?>
<html>
<body>
<div class="page-header">
<h1 style="margin: 2%;font-family: 'Lobster', cursive; color: teal">We are happy to listen from you..!</h1>
</div>
<div class="panel panel-success" style="margin-left: 10%;margin-right: 10%;margin-top: 3%;">
<div class="panel-heading">Feel the details..</div>
<div class="panel-body" style="padding-right: 10%; padding-bottom: 5%">
<form class="form-horizontal" role="form" action="contactus.php" method="post">
<div class="form-group">
<label class="control-label col-sm-2" for="pwd">Name:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="pwd" placeholder="Enter Name" name="name">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="email">Email:</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="email" placeholder="Enter email" name="email">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="pwd">Mobile No:</label>
<div class="col-sm-10">
<input type="text" maxlength="10" data-fv-numeric="true" name="mobile" data-fv-notempty-message="This field cannot be left blank." placeholder="Mobile No /optional " class="form-control" data-fv-field="data[User][mobile]">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="pwd">Message:</label>
<div class="col-sm-10">
<textarea name="message" placeholder="Write your text here, 200 characters only" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Submit</button>
</div>
</div>
</form>
</div>
</div>
</body>
</html>
<?php
//Receive form Data......
include "connect.php";
@$name = $_POST['name'];
@$email = $_POST['email'];
@$mobile = $_POST['mobile'];
@$message = $_POST['message'];
if(!empty($name)&&!empty($email)&&!empty($mobile)&&!empty($message)){
if($connection) {
$query = "INSERT into registration VALUES ('','$name','$email','$college_name','$mobile','$workshoptype','$laptop')";
$result = mysqli_query($connection,$query);
if($result){
echo " <div class=\"alert alert-success\" role=\"alert\">Request Successful , we will reach to you soon</div>";
}
}
}else{
echo "<div class=\"alert alert-danger\" role=\"alert\">Fields should not be empty, Please feel details once again..!!</div>";
}
?>
?>
<?php
include "footer.html"
?>