How do I get my images to show in the tables

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
chuckwgn
Forum Newbie
Posts: 4
Joined: Sat Nov 15, 2003 8:59 pm

How do I get my images to show in the tables

Post by chuckwgn »

So, I have everything else working correctly in my sql_query, but I cannot get my images to show up correctly. They just show up with blank boxes with red X's in them - Ususal occurance when the link is broken - I have been pulling my hair out trying to figure out this BS!!

My Setup - PHP with MYSQL backend.

It connects correctly -
Displays text fine

THE PICTURES WONT SHOW - I tryed to use a <img> tag to point to the $storedfilename but it just displays the text and nothing else -

I hope im clear -

Thanks for the help!

-Charlie
Paddy
Forum Contributor
Posts: 244
Joined: Wed Jun 11, 2003 8:16 pm
Location: Hobart, Tas, Aussie
Contact:

Post by Paddy »

Hmmm...you should post code when asking a question like this. Makes it easier for us to help. But I will try anyway. :)

You img tags should look like this

Code: Select all

<?php
<img src="<?php echo($storedfilename); ?>">
?>
Is that what it looks like? This will only work if the image is in the same directory as the file.
chuckwgn
Forum Newbie
Posts: 4
Joined: Sat Nov 15, 2003 8:59 pm

Post by chuckwgn »

Thanks for you reply - I figured it out and it was a little mistake...

Here is my code and it works great now - FYI

[echo "<td><img src=$rowResult[10] width='100' height='100'> </td>"; // where the image displays

Thanks again -

_C

:D
Post Reply