-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact_form.php
82 lines (70 loc) · 2.33 KB
/
contact_form.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
<?php include('header.php'); ?>
<?php include('navbar.php'); ?>
<?php
include('dbcon.php');
?>
<div class="container">
<div class="margin-top">
<div class="row">
<?php include('head.php'); ?>
<div class="span12
<form action="<?php $_PHP_SELF ?>" method="POST">
<div class="span5">
<div class="form-horizontal">
<div class="control-group">
<label class="control-label" for="inputEmail">First Name:</label>
<div class="controls">
<input type="text" id="inputEmail" name="first_name" placeholder="first Name" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputEmail">Last Name:</label>
<div class="controls">
<input type="text" id="inputEmail" name="last_name" placeholder="last Name" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputEmail">Email Address:</label>
<div class="controls">
<input type="text" id="inputEmail" name="email" placeholder="Email Address" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputEmail">Message:</label>
<div class="controls">
<input type="text" id="inputEmail" name="message" placeholder="Put Your Message Here" required>
</div>
</div>
<div class="control-group">
<div class="controls">
<button name="submit" type="submit" class="btn btn-info"><i class="icon-signin icon-large"></i> Send</button>
</div>
</div>
</div>
</div>
<div class="span6">
<div class="form-horizontal">
<?php
if(isset($_POST['submit']))
{
$firstname=$_POST['first_name'];
$lastname=$_POST['last_name'];
$email=$_POST['email'];
$message=$_POST['message'];
mysql_query("insert into contact (first_name,last_name,email,message) values('$firstname','$lastname','$email','$message')")or die(mysql_error()); ?>
<script type="text/javascript">
window.location='success2.php';
</script>
<?php
}else{
echo " ";
}
?>
</div>
</div>
</form>
</div>