Jump to content

Milshak

Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Posts posted by Milshak

  1. on one of my sites I use this;

     

    if($row[4]==""){

    echo"<td class=\"producttext\"><a href=\"details.php?id=$row[0]&storeID=$storeID&currency=$currency\"><img src=\"../images/savers/image_not_available.jpg\"></a></td>";

    }else{

    echo "<TD valign=\"top\" class=\"producttext\"><a href=\"details.php?id=$row[0]&storeID=$storeID&currency=$currency\"> <img src=\"../images/savers/$row[4]\"></a> </TD>";

    }

     

    where row[4] would be my image variable

  2. if there is a null in the image varialbe it will not display the image but the HTML is still there so you get a image missing x on the browser. Try a n if statement to check that the image exits first if so display it other wise display a default image or don't sent any html.

     

    if(row_Bilder[1}(

    img src=<?php echo $row_Bilder['bilde1];

    } else{

    display either a default image or no image.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.