I have a problem here...I have a file map.php with this content:
<html>
<head>
</head>                         
<body>
    <div class="wrapper">
        <!--harta-->
        <form id="harta" action='' method=post style="overflow:scroll; height: 598px; width: 848px;">
            <input type="image" src="../../design/images/maps/romania.jpg" 
name="foo" style=cursor:crosshair;/>
        </form>
        <!--bara de coordonate-->
        <div class="coordxy" style="hight:30px; width:80px; position:relative; top:-20; left:50px; border:3px solid #42aaf4">
            <?Php
            $foo_x=$_POST['foo_x']/20;
            $foo_y=$_POST['foo_y']/20;
            $x=(ceil($foo_x));
            $y=(ceil($foo_y));
            echo "X=".$x; echo "Y=".$y;
            ?>
        </div>
        <!--linkul img-->
        <iframe id="detaliisate" src="../../account-handeling/mapxy-handler.php" frameborder="0" border="0" cellspacing="0"
style="overflow:scroll; border-style: none; position:relative; width: 150px; height: 120px; margin-right:15px;left:678px; top: -640px;">iframul</iframe>
    </div>
</body>
</html>
I managed to get the coordinates by mouse pointing on a map, like simulating a tiled map, so I write the function to get mouse x-y coordinates on a image then divide results by the tile dimension, then ceil() the results at higher value...voilla...
All works fine, I have the coordinates displayed in <div class="coordxy" when I click, but the page is refreshing every time, but I don't think that is the problem.
When I want to get them in a iframe'mapxy-handler.php, it wont work:
<?php
include '../pages/countrymap/map.php';
global $x;
global $y;
?>
<div class="ffff"><?php echo $x;?></div>
It gives me some random elements as text from map.php like Submit and 2 errors:
( ! ) Notice: Undefined index: foo_x in C:\wamp\www\WorldDomination\pages\countrymap\map.php on line 27 Call Stack # Time Memory Function Location 1 0.0005 357448 {main}( ) ...\mapxy-handler.php:0 2 0.0007 361304 include( 'C:\wamp\www\WorldDomination\pages\countrymap\map.php' ) ...\mapxy-handler.php:7
( ! ) Notice: Undefined index: foo_y in C:\wamp\www\WorldDomination\pages\countrymap\map.php on line 28 Call Stack # Time Memory Function Location 1 0.0005 357448 {main}( ) ...\mapxy-handler.php:0 2 0.0007 361304 include( 'C:\wamp\www\WorldDomination\pages\countrymap\map.php' ) ...\mapxy-handler.php:7
What may be going wrong?
 
     
    