I have code in which a user can upload a file/image and text, and then it displays onto the page. I would like for the newest uploaded posts to show first and oldest last, so basically from the bottom up. Here is my code where I am loading it normally:
PHP/SQL:
<?php
$db = mysqli_connect("localhost", "", "", "boxofmem_GMSConnect");
$sql = "SELECT * FROM images";
$result = mysqli_query($db, $sql);
while ($row = mysqli_fetch_array($result)) {
echo "<div id='img_div'>";
echo "<p style='font-family:Roboto;color:white;font-size:20px;'>".$row['text']."</p>";
echo "<img src='images/".$row['image']."' ' style='width:100%;height:100%;'>";
echo "</div>";
}
?>
FIELDS:
ID (int:11) IMAGE (BLOB) TEXT (TEXT)