here below is coding
Code: Select all
$insert_post="insert into posts (post_title,post_image,post_desc)
values('$post_title','$post_image','$post_desc',)";
$query = "select * from posts order by rand() limit 0,8";
$run = mysqli_query($con, $query);
while ($row=mysqli_fetch_array($run)){
$title = $row['post_title'];
$image = $row['post_image'];
$desc = $row['post_desc'];
<h2> <?php echo $title; ?> </h2>
<br>
<center><img src="images/<?php echo $image; ?>" width="600" height="250"/></center>
<p> <?php echo $desc; ?> </p>thanks