Page 1 of 1
[SOLVED]Need to display an image as a link...
Posted: Wed Jan 12, 2005 10:39 am
by grammic
Hi everyone!
My problem is that by using gdlib, I was able to create an image that has lots of rectangles in it and everyone of them has a text.
I would like to display the text, or if not possible, the rectangles as links.
I have the suspicion that this can not be done...Any suggestion would be appreciated!
Thanks in advance.
Posted: Wed Jan 12, 2005 1:58 pm
by rehfeld
you mean like this?
Code: Select all
<a href="some_other_page.php"><img src="image_script.php"></a>
Posted: Thu Jan 13, 2005 5:14 am
by grammic
No...
you see the .php that has the image, includes rectangles that are not explicit objects.
I want those to be displayed as links...
Posted: Thu Jan 13, 2005 6:53 am
by patrikG
if I understand you correctly, you want to have certain parts of an image (doesn't matter whether they're generated with GDlib or not) to be a link?
That's an HTML, not a PHP, question: use an image map.
Posted: Thu Jan 13, 2005 7:17 am
by grammic
Thanks for your help!
Can I do that dynamically?
I mean the images that will be displayed as links won't be always the same.
And do you have in mind any URL with information about image maps?
Posted: Thu Jan 13, 2005 7:37 am
by patrikG
HTML Image Map tutorial
http://www.dtp-aus.com/im-map.htm
there is a server-side option, but it's quite a bit more advanced:
http://httpd.apache.org/docs/mod/mod_imap.html
Posted: Thu Jan 13, 2005 7:49 am
by grammic
Thanks!