Jump to content

Not outputting image?


ash992

Recommended Posts

Hey guys so I'm not sure what's wrong.. I'm trying to echo an image using some variables... simple stuff really but for some reason it's not working...

 

This is the code in php,

echo '<div align="left" class="advertpo"><img src="adverts/' . $UID. "/" . $UID . '.png"> </div>';

 

And here is what is showing when you view source,

<div align="left" class="advertpo"><img src="adverts/1/1.png"> </div></td></tr>

 

I call also press on the img link (adverts/1/1.png) And it shows me the image fine, but for some reason, when i load the page, It's not showing me the image? Anyone got any clue?

 

Thank-you very much in advance guys!

Link to comment
Share on other sites

Ahah okay, well,

 

 

UID is defined here, so it's just getting a variable from the database, I can echo it and it has the right value(1), So i don't know what the problem really is.. o.0

 

$UID = $b['UID'];

 

 

Additional details:

I recently moved servers and this exact script worked fine before the move?

 

 

-Thanks again

Link to comment
Share on other sites

The source code shows

 

</div>
<div align="left" class="advertpo"><img height="90px" width="728" src="adverts/1/1.png"> </div></td></tr>

 

and what it links to displays the image fine, and I shall try it now parkerj

 

Thanks guys,

Link to comment
Share on other sites

Nope, There's no css in that area, It's just outputting to a table,

 

<tr><td colspan="2">
<div class="advertchangepo"><a href="engines/change.php"><div class="bigG"> Your advert  [Change] </div></a>
</div>
<?php
echo '<div align="left" class="advertpo"><img height="90px" width="728" src="adverts/' . $UID. '/' . $UID . '.png"> </div>';
?>
</td></tr>

 

 

Link to comment
Share on other sites

What Html code do you mean? Or are you talking about ,

 

<tr><td colspan="2">
<div class="advertchangepo"><a href="engines/change.php"><div class="bigG"> Your advert  [Change] </div></a>
</div>
<?php
echo '<div align="left" class="advertpo"><img height="90px" width="728" src="adverts/' . $UID. '/' . $UID . '.png" /> </div>';
?>
</td></tr>
</table>
</div>

 

Thanks again guys

Link to comment
Share on other sites

Ahh my apologies, And I've just realized that tag was empty..

 

The tag's been removed from the stylesheet + php code,

 

<?php
echo '<div align="left"><img height="90px" width="728" src="adverts/' . $UID. '/' . $UID . '.png" /> </div>';
?>

 

It's still not working though :/

 

 

Link to comment
Share on other sites

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.