-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontri.php
More file actions
76 lines (66 loc) · 2.37 KB
/
Copy pathcontri.php
File metadata and controls
76 lines (66 loc) · 2.37 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Contribute</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="contribute.css">
<link rel="stylesheet" type="text/css" href="nav.css">
<script type="text/javascript" src="nav.js"></script>
</head>
<body>
<nav class="navigation-bar">
<a href="index.html"><img class="logo" src="img/logo.png"></a>
<a class="link" href="feedback.html">Feedback</a>
<a class="link" href="services.html">Services</a>
<a class="link" href="contri.php">Contribute</a>
<a class="link" onclick="on()" href="#">Courses</a>
</nav>
<div id="overlay" onclick="off()">
<table>
<tr>
<td><a class="link" href="cse.html">B.Tech cse</a></td>
<td><a class="link" href="ece.html">B.Tech ece</a></td>
<td><a class="link" href="bio.html">B.Tech biotech</a></td>
<td><a class="link" href="chem.html">B.Tech chem</a></td>
</tr>
</table>
</div>
<form id="cform" name="cform" method="post" action="contribute.php">
<input type="text" name="name" placeholder="Name" required>
<input type="number" name="mobile" placeholder="Mobile" required>
<input type="email" name="email" placeholder="Email" required>
<input type="text" name="book" placeholder="Book Title" required> <br>
<span>What would you like to contribute today?</span>
<button type="submit" value="Submit">Submit</button>
<button type="reset" value="Clear">Clear</button>
</form>
<section>These are books currently available.</section>
<?php
$connection = mysqli_connect('localhost', 'root', '','feedback');
$query = "SELECT * FROM contribute";
$result = mysqli_query($connection,$query);
$num=mysqli_num_rows($result);
if($num>0){
while($product=mysqli_fetch_array($result)){
?>
<table id="out"><tr>
<td style="width: 2vmax;"><?php echo $product['id']; ?></td>
<td style="width: 5vmax;"><?php echo $product['name'];?></td>
<td style="width: 5vmax;"><?php echo $product['mobile']; ?></td>
<td style="width: 10vmax;"><?php echo $product['email']; ?> </td>
<td style="width: 10vmax;"><?php echo $product['book']; ?></td>
</tr>
</table>
<?php
}
}
mysqli_close($connection);
?>
<a href="https://www.linkedin.com/in/thatbluekid/">
<h3 style="font-family: 'Squada One', cursive; color: black;
position: fixed; bottom: 0; margin: auto; width: 99vmax;
text-align: center;">© Pradeep 2019</h3>
</a>
</body>
</html>