-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontactus.php
94 lines (57 loc) · 2.4 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php include('header.php'); ?>
<!-- this is for donor registraton -->
<div class="contactus" style="background-color:#fff;">
<h3 class="text-center" style="background-color:#272327;color: #fff;">Contact Us</h3>
<div class="main_content">
<div class="col-md-6" style="border-right: 2px solid black;">
<article>
<h2>Abhas Modak, Viraj Jadhav, Onkar Kulkarni, Anushka Pawar <h2><h4>Pursuing Btech in Electronics and Communication Engineering</h4>
<h5>MIT Academy Of Engineering,Pune</h5>
<p> panushkapawar92@gmail.com<br>
onkarkulkarni3107@gmail.com<br>
ajmodak@mitaoe.ac.in <br>
jadhavvr@mitaoe.ac.in<br>
cell: +91 9545778445</p><br>
</article>
</div>
<div class="col-md-6">
<h2 class="text-center">Your Message</h2>
<form action="" method="post" class="text-center">
<label>
First Name: <input type="text" name="firstname" value="" placeholder="firstname" required>
</label><br><br>
<label>
Last Name: <input type="text" name="lastname" value="" placeholder="lastname" required>
</label><br><br>
<label>
Email: <input type="email" name="email" value="" placeholder="Your email" required>
</label><br><br>
<label>
Your Comment: <textarea name="comment" id="" cols="30" rows="4" required></textarea>
</label><br><br>
<input type="submit" value="Send Us" name="submit" style="margin-top: 75px;border-radius: 2px;"/>
<!-- <button name="submit" type="submit" class="btn btn-info"><i class="icon-signin icon-large"></i> Sign Up</button>
-->
</form><br><br><br>
</div>
</div>
</div>
<?php include('footer.php'); ?>
</div><!-- containerFluid Ends -->
<script src="js/bootstrap.min.js"></script>
<!-- contact information inserting -->
<?php
include('config.php');
if(isset($_POST['submit'])){
$sql = "INSERT INTO contact (firstname, lastname,email,comment)
VALUES ('" . $_POST["firstname"] ."','" . $_POST["lastname"] . "','" . $_POST["email"] . "','" . $_POST["comment"] . "' )";
if ($conn->query($sql) === TRUE) {
echo "<script>location.replace('success.php');</script>";
} else {
echo "<script>alert('There was an Error')<script>" . $sql . "<br>" . $conn->error;
}
$conn->close();
}
?>
</body>
</html>