Link to a image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

I am making a Guest Book of my own. People wrote comments to my guest book is saved in mysql database. There is a field in the table named "website". I retrive all the data from the table and display it on the page. Everything is fine but the website address I want to link with a picture so if someone wants to see the web site of the guest can visit there. My code to achive this is as under:

<a href='<? echo "$website"; ?>' target="_blank"><img src="homepage.gif"  border="0"></a>

What is happening that when mouse goes over the picture it reads the link along with my web site address for example if $website is holding data from the field www.websitelink.com and my web site address is 

http://www.example.com it read as 

http://www.example.com/SOME FOLDER NAME/guestbook/www.websitelink.com
which gives a 404 error.

How can I eleminate my web site address from the actual link that it will appear as www.websitelink.com only?

I will realy appriciate if someone can help me.

Best regards and thanks




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux