Link to home
Start Free TrialLog in
Avatar of maryelizabeth
maryelizabeth

asked on

How to I reference my variables

I'm using gd functions to combine a map and a square which marks a grid reference on the map.  Here's the code (it's the entire file map3.php):

<?php
Header("Content-type: image/jpeg");
$image= ImageCreateFromJPEG("images/map2.jpg");
$icon = ImageCreateFromPNG("images/square.PNG");
$trans = ImageColorAt($icon, 30,30);
ImageColorTransparent($icon, $trans);
$width = ImageSX($icon);
$height = ImageSY($icon);

ImageCopyResized($image,$icon, $x_coord,$y_coord,0,0,$width,$height,$width,$height);
ImageJPEG($image);
ImageDestroy($image);
?>

I'm accessing it from a link as follows:

<A href='../map3.php?x_coord=760&y_coord=189'>V33</A>

The problem is that I have very little control over the result because it is just an image, no html.  I want, for instance, to be able to add a caption to the window title bar, add more html to the result, scroll to where the square appears, add a close button inside the window, remove the margins, but I can't do any of these things.  I've tried using an html file which includes the image tag <img src="map3.php border="0"> but it's not picking up the coordinates which position the square.  

I've also tried using window.open and window.showmodaldialog.  These give me greater control but I cannot, for instance, caption the window or add a close button or scroll to where the square appears.

If anybody can help I'd be very grateful.
ASKER CERTIFIED SOLUTION
Avatar of rick2001
rick2001

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
why not this ?
<body>
<img src="../map3.php?x_coord=760&y_coord=189">
</body>
oops  sorry rick2001, same as you
Avatar of maryelizabeth
maryelizabeth

ASKER

Brilliant rick2001 - that's done the trick!

Thanks