Page 1 of 1

php images.....

Posted: Sun Jun 07, 2009 5:46 pm
by MrNeDev
Hiya all,

I'm in need of some help with a small bit of coding here, its likely some thing simple but here goes.......

Code: Select all

<a href="<?php echo $row['website']; ?>">
<?php echo $row['website']; ?>
</a>
The text above will feed into the page a website link, with the website link as the text displayed on the page.

What I need is to amend this into something that will display an image rather than text over the top. For example, here is a basic and feeble attempt by me, because I honestly dont know what im doing.

Code: Select all

<a href="display.php?ID=<?php echo $row['Website']; ?>">
<?php echo $row['InsertImageHere']; ?>
</a>
Simply put, placing the image url where ive placed "insertimagehere" has not worked, does anyone have any ideas? It my just have been the way im formatting the php to be honest (as i said, I've no idea). lol.

Thanx in advance.

Re: php images.....

Posted: Sun Jun 07, 2009 7:28 pm
by requinix
The HTML for an image with a link is

Code: Select all

<a href="link goes here"><img src="image location goes here"></a>