when i run this code i get only one image and returns "mysqli_fetch_array() expects parameter 1 error", I want multiple images in my page. Here is my code,
<?php
$con=mysqli_connect("localhost","root","","education");
$result = mysqli_query($con,"Select * from ep_posts where id > '4' ");
$sql = "Select * from ep_posts where image<>'' order by ID ASC ";
while ($row = mysqli_fetch_array($result)) {
$name = $row['post_title'];
$id = $row['ID'];
$des = $row['des'];
$des = substr($des, 0,35);
$link = $siteurl."?p=".$id;
$sth = $con->query($sql);
$result=mysqli_fetch_array($sth);
$image = '<img src="data:image/jpg;base64,'.base64_encode( $result['image'] ).'" height="150" width="150" >';
}
?>
help needed