how to use if(file_exist){function for images plz help }
Posted: Sat May 09, 2015 5:35 am
I have a problem when I post into my site without image it shows an image error how to do that if image exist show else don't show image place in post
here below is coding
help me if you can
thanks
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