|
Posted by chsadaki on 06/22/06 12:33
Hello....
I'm working on a page that finds the shortest path between two nodes.
The problem is when I draw a node on the map(in the administrative
page) to save it later in a mysql table, the node doesn't appear unless
I press the refresh button of the borwser...
this is the code that i worte
function drawNode($drawMode){
$x=$_GET[img_x];
$y=$_GET[img_y];
$map=imagecreatefromjpeg("nodedMap.jpg");
$Black=imagecolorallocate($map,0,0,0);
$drawMode='';
imagefilledarc($map,$x,$y,10,10,0,360,$Black,IMG_ARC_PIE);
imagejpeg($map,"nodedMap.jpg");
mysql_query("insert into nodeinfo values ('',$x,$y)");
return ;
}
and i call this function by this insturction:
<input name="img" type="image" src="nodedMap.JPG" width="569"
height="290" border="0" onClick="<? drawNode($drawMode); ?> " >
Navigation:
[Reply to this message]
|