0

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.

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by statsProf
0

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

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

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.