php images.....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MrNeDev
Forum Newbie
Posts: 3
Joined: Fri May 15, 2009 4:10 pm

php images.....

Post 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.
Last edited by Benjamin on Sun Jun 07, 2009 11:33 pm, edited 1 time in total.
Reason: Added [code=php] tags.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php images.....

Post 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>
Last edited by Benjamin on Sun Jun 07, 2009 11:34 pm, edited 1 time in total.
Reason: Changed code type from text to html.
Post Reply