Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: only showing a value if it equals something?  (Read 5503 times)

0 Members and 1 Guest are viewing this topic.

nicolem443

    Topic Starter


    Starter

    only showing a value if it equals something?
    « 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.

    fffreak



      Adviser

    • That's right I am a final fantasy freak.
    • Thanked: 3
      • Yes
      • JSPCRepair
    • Certifications: List
    • Experience: Guru
    • OS: Windows 7
    Re: only showing a value if it equals something?
    « Reply #1 on: December 29, 2008, 02:40:37 PM »
    How about you try this...

    Code: [Select]
    <td>
    <img scr="./showpic2.php?adid=$id" />
    </td>
    Computers are the future, not us. Learn everything you can about them while you still can, soon they will be learning about us... Every bit of advice that I give you is best guess, it is your choice whether or not you listen to it.