Please can some one help me with this , the code i pasted below is not outputting my database.
There’s connection to the database but no output/echoing.
Here is the code :
<?php //connect database require "connect_to_mysqli.php"; //query the datbase $sqlcommand = "SELECT * From posts ORDER by id desc"; $query = mysqli_query($sqlCommand) or die (mysqli_error()); while($row = mysqli_fetch_array($query)) { $title = $row["title"]; } mysqli_free_result($query); //close connection mysqli_close($connect); ?> <?php echo "<h3>$title</h3>"; ?>
<h3>SIMPLE, LIGHT...LIKE THE POWERFUL SNEWS CMS</h3>
Thanks guy.