Click here to Skip to main content
15,889,877 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
When i am displaying image in table from database, if there is no image it display only thumbnail and i dont want that. It should display only blank no thumbnail. I've search in google but not find any result. Can anyone please tell me ho will do it. I am using Dreamweaver CS3.
Posted
Comments
Killzone DeathMan 20-Jan-14 10:51am    
Please provide your code :D

My suggestion in pseudo code:
if (image is available) 
   echo "<img src='the image' />";
else
   echo ""; // or display a custom made blank image
 
Share this answer
 
v4
Thanks guys my work is done related with thumbnail. Here's the code for this:-

PHP
$img_dir = 'image/';
$image_name = $info['image'];

if(is_file($img_dir."".$image_name)){
echo "<td>"."<img src=\"image/". $info['image'] . "\" alt=\"\" width=100 heigth=50 />"."</td>";
}else{
echo "<td>&nbsp;</td>";



through this code, if there is no image in database then it display blank in table.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900