-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
108 lines (100 loc) · 3.77 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
<?php
include("header.php");
?>
<section id="contentSection">
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-8">
<div class="left_content">
<div class="contact_area">
<h2>Drop us a mail</h2>
<?php
if(isset($_POST[submit]))
{
$msg = "<strong>Name :</strong> $_POST[name]<br>
<strong>Email ID :</strong> $_POST[email]<br>
<strong>Mobile No. :</strong> $_POST[mobno]<br>
$_POST[message]";
include("sendmail.php");
sendmail([email protected],$_POST[name],$_POST[email],"Mail from College Social Network..",$msg);
echo "<script>alert(Thank you! We will get back to you soon.);</script>";
}
else
{
$msg = "<p>Feel free to contact us...</p>";
}
?>
<form action="" method="post" class="contact_form" name="frmcontact" onsubmit="return validateform()">
<input class="form-control" type="text" name="name" placeholder="Name*" required>
<br>
<input class="form-control" type="email" name="email" placeholder="Email*" required>
<span id="idemailid"></span>
<br>
<input class="form-control" type="mobile" name="mobno" placeholder="Mobile No." required>
<br>
<textarea class="form-control" name="message" cols="30" rows="10" placeholder="Message*" required ></textarea>
<span id="idmessage"></span>
<br>
<input type="submit" value="Send Message" name="submit">
</form>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-4">
<aside class="right_content">
<div class="single_sidebar">
<h2><span>CONTACT INFO</span></h2>
<ul class="spost_nav">
<li>
<div class="media wow fadeInDown"> <a href="#" class="media-left"> <img alt="" src="images/bveclogo.jpg"> </a>
<div class="media-body"> <a href="#" class="catg_title"> Barak Valley Engineering College. Nirala, Karimganj-788701</a> </div>
</div>
</li>
<li>
<div class="media wow fadeInDown"> <a href="#" class="media-left"> <img alt="" src="images/m3.jpg"> </a>
<div class="media-body"> <a href="#" class="catg_title"> Mail Us - [email protected]</a> </div>
</div>
</li>
<li>
<div class="media wow fadeInDown"> <a href="#" class="media-left"> <img alt="" src="images/call3.png"> </a>
<div class="media-body"> <a href="#" class="catg_title"> Call Us - +91 7002119930</a> </div>
</div>
</li>
</ul>
</div>
</aside>
</div>
</div>
</section>
<?php
include("footer.php")
?>
<script type="application/javascript">
function validateform()
{
var alphaExp = /^[a-zA-Z]+$/; //Variable to validate only alphabets
var alphaspaceExp = /^[a-zA-Z\s]+$/; //Variable to validate only alphabets and space
var alphanumbericExp = /^[a-zA-Z0-9]+$/; //Variable to validate only alphabets and space
var numericExpression = /^[0-9]+$/; //Variable to validate only numbers
var validatecondtion = 0;
document.getElementById("idemailid").innerHTML ="";
document.getElementById("idmessage").innerHTML ="";
if(document.frmcontact.email.value=="")
{
document.getElementById("idemailid").innerHTML ="<font color=red>Kindly select User type..</font>";
validatecondtion=1;
}
if(document.frmcontact.message.value=="")
{
document.getElementById("idmessage").innerHTML ="<font color=red>Kindly select User type..</font>";
validatecondtion=1;
}
if(validatecondtion==1)
{
return false;
}
else
{
return true;
}
}
</script>