-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimphp.php
More file actions
45 lines (37 loc) · 1.25 KB
/
timphp.php
File metadata and controls
45 lines (37 loc) · 1.25 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
<html>
<head>
<title>Gift.Me</title>
<!--Stylesheets, JavaScript etc here-->
</head>
<body>
<?php include "dbconnect.inc" ;
$sql = "SELECT * FROM product_list";
$result = $connect->query($sql);
if ($result->num_rows > 0) {
// output data of each row
echo "Present List:" . "<br>";
while($row = $result->fetch_assoc()) {
echo $row['product_title'] ?><input type="checkbox" name="present" value="<?php $row['product_title'] ?>"> </br>
<?php
}
}
else {
echo "0 results";
}
?>
</br></br></br></br>
<!--Matt's version-->
<?php
$sql = "SELECT * FROM product_list";
$result = $connect->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo $row['product_title'] . '<input type="checkbox" name="present" value="' . $row['product_title'] . '">';
}
}
else {
echo "0 results";
}
?>
</body>
</html>