-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
49 lines (43 loc) · 1.36 KB
/
index.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
<?php
require_once('dbConnection.php');
require_once('functions.php');
$db = connectToDatabase();
$weaponsData = getWeaponsData($db);
$weaponsNames = displayWeaponNames($weaponsData);
$weaponsStats = displayWeaponData($weaponsData);
$db = NULL; //This apparently closes the PDO connection according to https://stackoverflow.com/questions/18277233/pdo-closing-connection
//Not sure if it actually works though.
?>
<!DOCTYPE html>
<html lang="en-GB">
<head>
<title>
My Collection of Old School FPS weapons
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="normalize.css" type="text/css"/>
<link rel="stylesheet" href="styles.css" type="text/css"/>
</head>
<body>
<div>
<header>
<h1>
Collection of Old School FPS weapons
</h1>
</header>
<main>
<div class="contentsContainer">
<h2>
Collection Contents
</h2>
<ul>
<?=$weaponsNames;?>
</ul>
</div>
<section>
<?=$weaponsStats;?>
</section>
</main>
</div>
</body>
</html>