Username (epiz_32975619) and Website URL
http://stengrade.great-site.net/index.php
Error Message
None at all, it just does not work.
Other Information
All pages in my website with a mysql connection don’t load, only the navbar added with an include does. The weirdest part is that my site works perfectly on my own computer’s local server.
Any help would be greatly appreciated.
Here is my code for one of the pages incase I messed something up.
<?php
include "nav.php";
$db = new PDO("mysql:host = ; dbname= ", " ", " ");
$query = $db->prepare("SELECT * FROM monster");
$query->execute();
$result = $query->fetchAll(PDO::FETCH_ASSOC);
?>
<body>
<div class="bg-primary bg-opacity-10">
<div class="container-lg bg-primary bg-opacity-10" style="min-height: 62%">
<br><br>
<div class="row">
<?php
foreach ($result as $data) {
echo "<div class='col'>";
echo "<div class='card bg-danger' style='max-width: 150px;'>";
echo "<img class='img-fluid img-thumbnail bg-danger ' style ='max-height:150px;' src='" .$data['img'] ."'>";
echo "<div class='card-body'>";
echo "<b>" . $data['name'] . "</b><br>";
echo "<i class='bi bi-emoji-dizzy'></i> : " . $data['number'];
echo " </div>";
echo "</div>";
echo "</div>";
}
?>
</div>
<br>
</div>
</div>
<?php include "footer.php"; ?>
</body>