Computer Hope

Internet & Networking => Web design => Topic started by: nicolem443 on December 27, 2008, 04:23:03 PM

Title: only showing a value if it equals something?
Post by: nicolem443 on December 27, 2008, 04:23:03 PM
Is this possible on my display page I have this
code : <td>
<img src="showpic2.php?adid=<?=$id?>" />
</td>

the default background is in css and has a no picture image which shows when a picture is not there but for example in this table td there is the no image background picture controlled by css but no picture in the database in this cell so how can i make it so it only shows a picture when there is a value to the picture? right now just shows the background with the annoying no image x.
Title: Re: only showing a value if it equals something?
Post by: fffreak on December 29, 2008, 02:40:37 PM
How about you try this...

Code: [Select]
<td>
<img scr="./showpic2.php?adid=$id" />
</td>