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("image s/map2.jpg ");
$icon = ImageCreateFromPNG("images /square.PN G");
$trans = ImageColorAt($icon, 30,30);
ImageColorTransparent($ico n, $trans);
$width = ImageSX($icon);
$height = ImageSY($icon);
ImageCopyResized($image,$i con, $x_coord,$y_coord,0,0,$wid th,$height ,$width,$h eight);
ImageJPEG($image);
ImageDestroy($image);
?>
I'm accessing it from a link as follows:
<A href='../map3.php?x_coord= 760&y_coor d=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.
<?php
Header("Content-type: image/jpeg");
$image= ImageCreateFromJPEG("image
$icon = ImageCreateFromPNG("images
$trans = ImageColorAt($icon, 30,30);
ImageColorTransparent($ico
$width = ImageSX($icon);
$height = ImageSY($icon);
ImageCopyResized($image,$i
ImageJPEG($image);
ImageDestroy($image);
?>
I'm accessing it from a link as follows:
<A href='../map3.php?x_coord=
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
oops sorry rick2001, same as you
ASKER
Brilliant rick2001 - that's done the trick!
Thanks
Thanks
<body>
<img src="../map3.php?x_coord=7
</body>