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?

 

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.