-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
119 lines (102 loc) · 4.21 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
<?php include"config.php";?>
<!DOCTYPE html>
<html lang="en">
<?php include"head.php";?>
<body>
<?php
include"top_nav.php";
?>
<!-- Page Content -->
<div class="container" style="margin-top:70px;">
<div class="row">
<div class="col-md-8">
<?php
if(isset($_POST["submit"]))
{
$sql="INSERT INTO messages (NAME, CONTACT, EMAIL, MESSAGE, STATUS,LOGS) VALUES ('{$_POST["name"]}', '{$_POST["phone"]}', '{$_POST["email"]}', '{$_POST["message"]}', 1,NOW());";
if($con->query($sql))
{
echo '
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Success!</strong> Your message has been Successfully sent.
</div>
';
}
}
?>
<h3 class='text-primary'>Send us a Message</h3>
<form method="post" action="contact.php" role="form" >
<div class="control-group form-group">
<div class="controls">
<label>Full Name:</label>
<input type="text" class="form-control" name="name" required>
<p class="help-block"></p>
</div>
</div>
<div class="control-group form-group">
<div class="controls">
<label>Phone Number:</label>
<input type="text" class="form-control" onkeypress='validate(event)'maxlength="10" name="phone" required>
</div>
</div>
<div class="control-group form-group">
<div class="controls">
<label>Email Address:</label>
<input type="email" class="form-control" name="email" >
</div>
</div>
<div class="control-group form-group">
<div class="controls">
<label>Message:</label>
<textarea rows="5" cols="100" class="form-control" name="message" required maxlength="999" style="resize:none"></textarea>
</div>
</div>
<div id="success"></div>
<!-- For success/fail messages -->
<button type="submit" class="btn btn-primary" name="submit"><i class='fa fa-send'></i> Send Message</button>
</form>
</div>
<div class="col-md-4">
<h3 class='text-primary'>Contact Details</h3>
<p>
Blood Bank & <br>Friend Medical Trust, <br>
34/44 ,Cherry Street,<br>
Karnataka-673639.<br>
Bangalore Dt.
</p>
<p><i class="fa fa-phone"></i>
<abbr title="Phone">P</abbr>: 9745096452</p>
<p><i class="fa fa-envelope-o"></i>
<abbr title="Email">E</abbr>: <a href="#" >[email protected]</a>
</p>
<p><i class="fa fa-clock-o"></i>
<abbr title="Hours">H</abbr>: 24*7</p>
<p><i class="fa fa-globe"></i>
<abbr title="Website">W</abbr>: <a href="index.php">www.bloodbank.org</a></p>
<ul class="list-unstyled list-inline list-social-icons">
<li>
<a href="#"><i class="fa fa-facebook-square fa-2x"></i></a>
</li>
<li>
<a href="#"><i class="fa fa-linkedin-square fa-2x"></i></a>
</li>
<li>
<a href="#"><i class="fa fa-twitter-square fa-2x"></i></a>
</li>
<li>
<a href="#"><i class="fa fa-google-plus-square fa-2x"></i></a>
</li>
</ul>
</div>
</div>
<hr>
<?php include"footer.php"; ?>
</div>
<!-- /.container -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>