Forum Moderators: coopster
When clicked the image goes to a PHP form and I then need to get the x & y values into a PHP form but I cannot get it to work.
The url looks like this: [site.ext...]
The form that contains the images method="GET" and so I was trying to pull the value of the coordinate using <?php $x = $_GET['coordinate.x'];?> but that doesnt seem to work, it basically returns no value.
I have also tried using explode to get the value but it returns nothing, I am guessing it has something to do with the fullstops in the URL.
If anyone has a solution they can tell me about please do so. If you need any more info than I have listed please ask me for what you need to help.
Thanks in advance everyone.
PHP and HTML [php.net]
Be careful though as the MSIE browser will not return [webmasterworld.com] what you may expect. Moz-based browsers will indeed send all three values back, the 'coordinate' value, the coordinate_x value and the coordinate_y value.
if you are passing vars to a script in an array, $_GET and $_POST are both arrays obviously, and you can't figure out what you are getting then do this
echo '<pre>';
print_r($_GET);
echo '</pre>';
that should have showed you where your problem was. It is the first thing I put in any script that is receiving get/post information. It helps me ensure that I am receiving what I am expecting before I start trying to do anything with it.