Im creating a webpage which displays the information from my MYSQL database using php code. However, when I test the page, rather then displaying the information, the code itself appears instead of the information. i cant figure out why such is happening as i have used the code before with no problem.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Game Portal</title>
<style>
//CSS CODE
</style>
</head>
<body>
<div class="right"></div>
<div class="center">
<?php
$table_name = "";
$host_name = "";
$user_name = "";
$password = "";
$db_name = "";
$db_link = mysqli_connect($host_name, $user_name, $password, $db_name) or die(mysqli_error($db_link));
$query = "select Name, Cover from $table_name;";
$result = mysqli_query($db_link, $query) or die(mysqli_error($db_link));
echo "<table>";
while ($row = mysqli_fetch_array($result)) {
echo "<tr><td>{$row[0]}</td>";
echo "<td align=right>{$row[1]}</td></tr>";
}
echo "</table>";
?>
</div>
</div>
<div class="footer">
</div>
</body>
</html>
Note that i removed bits of the code that aren't needed for the php part in order to make it easier to read.

