-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
67 lines (55 loc) · 1.74 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
<html>
<head>
<title>blood donation|contact us</title>
<link rel="stylesheet" href="styles.css">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<header>
<nav>
<h1>BLOOD negative</h1>
<ul id="nav">
<li><a class="st" href="index.php">HOME</a></li>
<li><a class="st" href="about.php">ABOUT US</a></li>
<li><a class="st" href="gallery.php">GALLERY</a></li>
<li><a class="active" href="#">CONTACT</a></li>
</ul>
</nav>
</header>
<div class="divider"></div>
<div class="contactimg"> <br><br>
<span class="contact">
<b><u>CONTACT US</u></b>
<form action="contact.php" method="post">
<textarea class="form3" placeholder="Message/Report/Feedback" name="message" required></textarea><br>
<input class="form3" type="email" name="ceid" placeholder="example@gmail.com" required><br>
<input class="form2" type="submit" value="submit" name="submit"><br>
</form>
</span> <br><br>
<a class="con" href="registerform.php">Become a blood donor.</a><br>
<a class="con" href="searchdonor.php">Search for donor.</a>
</div>
<div class="divider"></div>
<footer>
copyrights © reserved by BLOODnegative since 2019.<br>
<u>support@bloodnegative.com</u>
</footer>
</body>
<?php
require('db.php');
// If form submitted, insert values into the database.
$message=$_POST['message'];
$ceid=$_POST['ceid'];
// foreach($_POST as $key=>$value)
// {
// if(empty(trim($value))
// echo "$key input required of value ";
// }
if (isset($message,$ceid)) {
# code...
$query = "INSERT into `contact` (message, ceid) VALUES('$message', '$ceid')";
}
$result = mysqli_query($conn,$query);
mysqli_close($conn); //End connection to database
?>
</html>