Jump to content

Finding out image click co-ordinates problem


midnight123

Recommended Posts

Hello.I copied this tutorial:

http://www.plus2net.com/php_tutorial/php_image_coordinates.php

 

It works fine on the website but on my computer I

get these errors:

Notice: Undefined index: foo in C:\Program Files\EasyPHP 2.0b1\www\cord.php on line 3

 

Notice: Undefined variable: foo_x in C:\Program Files\EasyPHP 2.0b1\www\cord.php on line 5

 

 

Notice: Undefined variable: foo_y in C:\Program Files\EasyPHP 2.0b1\www\cord.php on line 7

 

It doesn't seem to be recognizing the

input image "Foo"

 

<html><body>
<form action='cord.php' method=post>
          <input 

type="image" alt=' Finding coordinates of an image' src="xy-coordinates.jpg" 

name="foo" id="foo"/>
</form>
</body></html>

 

 

<html><body><center>Hello</center><br>
<?php
$foo=$_POST["foo"];

echo($foo_x);
echo("<br>");
echo($foo_y); 
?>
</body></html>

Does Anybody know what the problem is?

 

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.