So I don't know why but when I put my website up online from offline suddenly the website will not show any symbols and I'm not sure why. It worked fine offline. Really couldn't find any info on this never seen it before :(
<?php
header('Content-Type: text/html; charset=UTF-8');
echo <<<_END
<!DOCTYPE html>
<html>
<head>
<title>$title</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="bootstrap/css/bootstrap-theme.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body>
_END;
and index.php
<?php
$title = 'Baz Building';
require_once 'header.php';
require_once 'nav.php';
?>
<div class="container">
<h1>Welcome to baz Build by Richard Hayward</h1><br><br>
<div class="col-8">
<h2 class="text-center">Houses</h2>
</div>
<div>
<ul class="list-group">
<?php
//Get connection details from file
require_once'mysqli-con.php';
//Create new connection
$conn = new mysqli($hn, $un, $pw, $db); //Create new object, MYSQLI connection
if ($conn->connect_error) die ($conn->connect_error); //Display error if failed to connect
// Create first query to get all house names for count
$query_names = $conn->query('SELECT name FROM house_names'); // Query all names data
$num_rows = $query_names->num_rows; // Get the number of rows for loop
//Start loop for output of each item
for($c = 0 ; $c < $num_rows ; ++$c){
//Query Join
$query_names->data_seek($c);
$name = $query_names->fetch_array(MYSQLI_NUM);
$query = "SELECT house_names.id, house_names.name, houses_has_features.house_names_id, house_types.type, features.feature FROM house_names
JOIN houses_has_features
ON house_names.id = houses_has_features.house_names_id
JOIN house_types
ON house_types.id = houses_has_features.house_types_id
JOIN features
ON houses_has_features.features_id = features.id
WHERE house_names.name = \"$name[0]\"";
$query_join = $conn->query($query);
$rows = $query_join->num_rows;
echo '<p>';
//Output name and type for each item
$first_rows = $query_join->fetch_array(MYSQLI_ASSOC);
echo '<li class="list-group-item active">' . $first_rows['name'] . '</li>';
echo '<li class="list-group-item"><b>Type: </b>' . $first_rows['type'] . '</li>';
echo '<li class="list-group-item"><b>Features: </b>';
for($j = 0 ; $j < $rows ; ++$j) //Features loop
{
$query_join->data_seek($j);
$row = $query_join->fetch_array(MYSQLI_NUM);
//Output all features for each item
echo $row[4] . ', ';
};
};
// Close objects
$conn->close();
$query_join->close();
$query_names->close();
?>
</ul>
</div>
</div>
</body>
</html>