Created
July 19, 2020 03:58
-
-
Save amardeep18/285a65bd4f410f870753b7d58dbe9f58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//fetch.php | |
$connect = mysqli_connect("localhost", "root", "", "auto_refresh"); | |
$query = "SELECT * FROM tbl_post ORDER BY post_id DESC"; | |
$result = mysqli_query($connect, $query); | |
if(mysqli_num_rows($result) > 0) | |
{ | |
while($row = mysqli_fetch_array($result)) | |
{ | |
echo '<p>'.$row["post_name"].'</p>'; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment