Skip to content
Snippets Groups Projects
Commit 6f62a92b authored by Joey Ballentine's avatar Joey Ballentine
Browse files

added some php stuff

parent 77639fce
No related branches found
No related tags found
No related merge requests found
<?php
DEFINE ('DB_USER', 'hci_hub_io');
DEFINE ('DB_PSWD', 'HThpytpXkvty5fV');
DEFINE ('DB_HOST', 'db4free.net:3306');
DEFINE ('DB_NAME', 'hci_hub_io');
$dbcon = mysqli_connect(DB_HOST, DB_USER, DB_PSWD, DB_NAME);
if (!$dbcon) {
die('error connecting to database');
}
echo 'you have connected successfully';
?>
......@@ -54,5 +54,28 @@
</div>
</div>
</div>
<?php
include('connect-mysql.php')
$sqlget = "SELECT * FROM Services";
$sqldata = mysqli_query($dbcon, $sqlget) or die('error getting data');
echo "<table>";
echo "<tr><th>ID</th><th>Name</th></tr>"
while($row = mysqli_fetch_array($dbdata, MYSQLI_ASSOC)) {
echo "<tr><td>";
echo $row['service_id'];
echo "</td><td>";
echo $row['name']
echo "</td></tr>";
}
echo "</table>";
?>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment