-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
33 lines (31 loc) · 778 Bytes
/
Copy pathindex.php
File metadata and controls
33 lines (31 loc) · 778 Bytes
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
<?php
/**
* @author Zach Giordano
* @created 11/6/17
* Main index.php file for the dev-staging site
*/
?>
<?php if(false): ?>
<?php include('database/GetConnection.php'); ?>
<?php echo "<p>Testing the Database!</p>"; ?>
<?php
// Create Connection
$conn = new GetConnection();
$mysqli = $conn->getConnection("testsite");
$sql = "SELECT * FROM video_games WHERE id=1";
$result = $mysqli->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "Video Games We Like<br>". "Name: " . $row["name"] . ", "
. "Platform: " . $row["platform"] . "<br>";
}
} else {
echo "0 results";
}
$mysqli->close();
?>
<?php endif; ?>
<html>
<title>Staging Site | Jeanne Giordano</title>
</html>