-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
155 lines (125 loc) · 4.34 KB
/
contact.html
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/contact.css" />
<title>Contact Us</title>
</head>
<body>
<!-- Navbar Section Starts Here -->
<section class="Navbar">
<div class="container navbar-container">
<div class="logo">
<img
class="responsive-img"
src="image/logo/logo 15.png"
alt="Restaurant Logo"
/>
</div>
<div class="menu text-allign-center">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="foods.html">Foods</a></li>
<li><a href="categories.html">Categories</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
<div class="clearfix"></div>
</div>
</section>
<!-- Navbar Section Ends Here -->
<div class="container">
<h1 class="text-allign-center" style="color: rgb(255, 106, 0)">
Contact Us
</h1>
<br />
<div class="wrapper">
<!-- COMPANY INFORMATION -->
<div class="company-info">
<h3>My Restraun</h3>
<ul>
<li><i class="fa fa-road"></i> Satsang Ashram</li>
<li><i class="fa fa-phone"></i> +91 9006337628</li>
</ul>
</div>
<!-- End .company-info -->
<!-- CONTACT FORM -->
<div class="contact">
<!-- <h3>E-mail Us</h3> -->
<form id="contact-form" action="" method="POST">
<p>
<label>Name</label>
<input type="text" name="name" id="name" required />
</p>
<p>
<label>Proffesion</label>
<input type="text" name="company" id="company" />
</p>
<p>
<label>E-mail Address</label>
<input type="email" name="email" id="email" required />
</p>
<p>
<label>Phone Number</label>
<input type="text" name="phone" id="phone" />
</p>
<p class="full">
<label>Message</label>
<textarea name="message" rows="5" id="message"></textarea>
</p>
<p class="full">
<button type="submit">Submit</button>
</p>
</form>
<!-- End #contact-form -->
</div>
<!-- End .contact -->
</div>
<!-- End .wrapper -->
</div>
<!-- End .container -->
<!-- Footer Section Starts Here -->
<section class="Footer">
<div class="container text-allign-center">
<p>All rights reserved. Designed By <a href="">Bheem Singh</a></p>
</div>
</section>
<!-- Footer Section Ends Here -->
</body>
</html>
<!-- <?php
$localhost = "localhost";
$username = "root";
$password = "";
$dbname = "restr_contact";
//Establishing connection
$conn = new mysqli($localhost, $username, $password, $dbname);
//Error check
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$name = $_POST['name'];
$company = $_POST['company'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
// $sql="INSERT INTO user_db.tbl_contact (fname,lname,email,mob,comments)
// VALUES('$fname','$lname','$email','$mob','$comments');";
$sql = "INSERT INTO `contact` (`cn_name`, `cn_proffesion`, `cn_email`, `cn_phone`)
VALUES ('$name', '$company', '$phone', '$message');";
// INSERT INTO `contact` (`cn_sno`, `cn_name`, `cn_proffesion`, `cn_email`, `cn_phone`, `cn_dt`)
// VALUES ('1', 'Bheem Singh', 'devloper', '[email protected]', '870934997', current_timestamp());
$result = $conn->query($sql);
if ($result == TRUE)
{
echo "entered successfully";
}
else
{
echo "Error:". $sql ."<br>". $conn->error;
}
?> -->