Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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