I have the following problem passing coordinate data from a web page to a php handler that will read and write the data to a storage file or a database. What I am asking the user to do is click on a line (a png image) which has attributed coordinates x,y. I am using the following code to present the image:

<form action='CS4L03_Hndlr.php' method='get'>
<input type='image' name='shapes_image' src='10cmLine.png' style='border: none;'/>
</form>
When the participant clicks on the image, the x and y values are sent in the url as shown below.

http:/../CS4L03_Hndlr.php?shapes_image.x=440&shapes_image.y=21

However, when I try to read the data using the file handler program CS4L03_Hndlr.php no data are passed.

This is the code for the handler program:

$linex = $_GET['shapes_image.x'];
$liney = $_GET['shapes_image.y'];

All suggestions appreciated. Cheers.

The dots get changed to underscores. So use this instead:

$linex = $_GET['shapes_image_x'];
$liney = $_GET['shapes_image_y'];

Bold Text HereFABULOUS!
Thank-you so much for your rapid response. This will really help our work.
Cheers.

The question has been resolved ... thanks for your help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.