-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
200 lines (170 loc) · 6.04 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
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.16/tailwind.min.css" />
<link rel="stylesheet" href="css.css" />
<title>Contact Us</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.16/tailwind.min.css" />
<style>
.container {
padding: 20px;
text-align: center;
margin: auto;
}
b{
font-size: 1.5rem;
}
textarea {
border: 2px solid black;
width: 30rem;
height: 10rem;
border-radius: 30px;
}
input {
border: 2px solid black;
border-radius: 30px;
}
.box {
background-color: #f5f5f5;
border: 2px solid #ccc;
border-radius: 5px;
padding: 20px;
/* text-align: left; */
}
h1 {
font-size: 36px;
margin-bottom: 20px;
}
p {
font-size: 18px;
margin-bottom: 10px;
}
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
}
caption,
h1 {
text-align: center;
margin-top: 50px;
color: black;
font-size: 2rem;
color: #990000;
}
table {
margin: 50px auto;
border-collapse: collapse;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
background-color: #fff;
}
table th,
table td {
padding: 10px;
border: 1px solid #ccc;
text-align: left;
}
table th {
background-color: #990000;
color: #fff;
font-weight: bold;
}
table tr:nth-child(even) {
background-color: #f2f2f2;
}
table tr:hover {
background-color: #ddd;
}
button[type="submit"] {
margin: 10px 0;
padding: 10px;
width: 15%;
border: none;
border-radius: 4px;
background-color: #990000;
color: black;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.2s;
margin-left:5rem;
}
</style>
</head>
<body>
</head>
<!-- Navigation Bar -->
<!-- Navigation Bar -->
<nav class="bg-red-700 p-2 mt-0 w-full">
<div class="container mx-auto flex flex-wrap items-center">
<div class="flex w-full md:w-1/2 justify-center md:justify-start text-white font-extrabold">
<a class="text-white no-underline hover:text-white hover:no-underline" href="#">
<span class="text-2xl pl-2">Blood Bank Management System</span>
</a>
</div>
<div class="flex w-full md:w-1/2 justify-center md:justify-end">
<ul class="list-reset flex justify-between flex-1 md:flex-none items-center">
<li class="flex-1 md:flex-none md:mr-3">
<a class="inline-block py-2 px-4 text-white font-bold no-underline" href="in.html">HOME</a>
</li>
<li class="flex-1 md:flex-none md:mr-3">
<a class="inline-block text-white no-underline hover:text-gray-200 hover:text-underline py-2 px-4"
href="AdminLogin.php">ADMIN</a>
</li>
<li class="flex-1 md:flex-none md:mr-3">
<a class="inline-block text-white no-underline hover:text-gray-200 hover:text-underline py-2 px-4"
href="in.html#learn">LEARN</a>
</li>
<li class="flex-1 md:flex-none md:mr-3">
<a class="inline-block text-white no-underline hover:text-gray-200 hover:text-underline py-2 px-4"
href="contact.php">CONTACT</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="box">
<h1>Contact Details</h1>
<p><strong>Admins: </strong>20BCE191 Drashti Panseriya, 20BCE231 Riddhi Prajapati, 20BCE241 Rana Jay </p>
<p><strong>Institute name:</strong> Nirma University</p>
<p><strong>Email:</strong>cse_students@nirmauni.ac.in</p>
<p><strong>Phone Number:</strong>9876543210</p>
<p><strong>Address :</strong>Sarkhej - Gandhinagar Hwy, Gota, Ahmedabad, Gujarat 382481</p>
</div>
</div>
<div class="container">
<div class="box">
<h1>Please Provide your valuable Feedback</h1>
<form method='post'>
<b>Email:</b> <input type='text' name='email'><br><br>
<textarea name='feedback'> </textarea>
<br>
<button type='submit'>Submit</button>
<br>
</form>
</div>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// Establish a database connection
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "db";
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
//store feedback in database
$email = $_POST['email'];
$feedback = $_POST['feedback'];
$sql = "INSERT INTO `feedback` (`email`,`feedback`) VALUES ('$email','$feedback')";
if ($conn->query($sql) === FALSE) {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
}
?>
</body>
</html>