Connecting Tech Pros Worldwide Forums | Help | Site Map

Image Map, SQL and PHP?

Heidi
Guest
 
Posts: n/a
#1: Jul 17 '05
I want to know if it is possible to make a server side image map that gets
the link data
from a database using PHP instead of a file.

Heidi

P.S. I have researched this myself but I have still come up empty...



Erwin Moller
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Image Map, SQL and PHP?


Heidi wrote:
[color=blue]
> I want to know if it is possible to make a server side image map that gets
> the link data
> from a database using PHP instead of a file.
>
> Heidi
>
> P.S. I have researched this myself but I have still come up empty...[/color]

Hi,

Yes you can.
You need 'serverside imagemaps'.

Look at this (second example)
http://www.cris.com/~automata/variety.htm

This is how it works:
1) use a serverside map.
2) Let the script (the a href-target) catch the X and Y coordinates.
3) Use some routine to decide what area is clicked. (I cannot help here)
4) lookup in your database what link you want.
5) redirect the browser to that link, simply by using headers.

Good luck.

Regards,
Erwin Moller


Closed Thread