Jump to content

images in mysql db and the red cross of ie


kev wood

Recommended Posts

I would do something like

 

<?php
   if(!empty($row['image'])) {
        echo '<img src="images/'.$row['image'].'">';
   }
?>

 

that way if the field hasn't got an image title in the field don't do the img src

 

btw are you uploading and putting the filename is the database cos this is how it would work?

EDIT:

Sorry, missed the original question.

 

You can assign a "no-image" picture to it that is a valid image. That way something is displayed. 

 

EDIT: EDIT:

 

And if you tried AdRock's code, please explain why that did not solve the issue, if you would like further help.

sorry i got side tracked yesterday i will put it to the test today.  to be honest tho i thought that would do it ne way and went to implement it then had to leave the computer to do other stuff will get bak today tho and mark the solved button it if works.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.