Connecting Tech Pros Worldwide Help | Site Map

Image Map, SQL and PHP?

  #1  
Old July 17th, 2005, 11:47 AM
Heidi
Guest
 
Posts: n/a
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...


  #2  
Old July 17th, 2005, 11:47 AM
Erwin Moller
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
null or not an object error in IE works perfectly in Firefox modeep answers 21 January 1st, 2008 08:58 AM
Plotting mysql values in a dynamic image. Noctiluca answers 2 October 2nd, 2006 10:04 PM
Dynamic Maps with php?? Craig Storey answers 7 July 17th, 2005 01:40 PM