ch******@hotmail.com wrote:
HI
I am working on a project for the university, I need to know if there
is a method in php that returns the x,y of the mouse click. cos I need
it to allocate some positions on a map of my city.
thanx in advance
shameram sadaki
Yes, if you're talking about a server-side image map. If you have the
following on a page:
<form>
<input type="image" name="cmap" src="campus_map.jpg">
</form>
when the user clicks on a spot on the picture, the browser would sent
the variable pair cmap.x and cmap.y to the server. These two can be
retrieved in PHP from the $_GET array at the indices "cmap_x" and
"cmap_y".
Server-side image map is a somewhat outdated technique however. People
nowadays usually use client-side image maps instead.