I'm trying to create a simple blog and for some reason , it doesnt retrieve the dummy content from the mysql database.
here is my entire code
<?php
$db_host = "host";
// Place the username for the MySQL database here
$db_username = "root";
// Place the password for the MySQL database here
$db_pass = "";
// Place the name for the MySQL database here
$db_name = "someblog";
$myConnection = mysqli_connect("$db_host","$db_username","$db_pass", "$db_name") or die ("could not connect to mysql");
?>
<html>
<head>
<title> Test Blog</title>
</head>
<body>
<?
$sqlCommand = "SELECT title, content, 'date modified ' FROM blog1tables ORDER BY id DESC";
$query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error());
while ($row = mysqli_fetch_array($query)) {
$title = $row["title"];
$content = $row["content"];
$datemodified = ["date modified"];
}
mysqli_free_result($query);
?>
<table border = '4'>
<tr><td <? echo $title;?> </td></tr>
<tr><td colspan="4"> <? echo $content; ?> </td></tr>
<tr><td> <? echo $datemodified; ?> </td></tr>
</table>
</body>
</html>
help