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($drawM ode){
$x=$_GET[img_x];
$y=$_GET[img_y];
$map=imagecreat efromjpeg("node dMap.jpg");
$Black=imagecol orallocate($map ,0,0,0);
$drawMode='';
imagefilledarc( $map,$x,$y,10,1 0,0,360,$Black, IMG_ARC_PIE);
imagejpeg($map, "nodedMap.jpg") ;
mysql_query("in sert into nodeinfo values ('',$x,$y)");
return ;
}
and i call this function by this insturction:
<input name="img" type="image" src="nodedMap.J PG" width="569"
height="290" border="0" onClick="<? drawNode($drawM ode); ?> " >
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($drawM ode){
$x=$_GET[img_x];
$y=$_GET[img_y];
$map=imagecreat efromjpeg("node dMap.jpg");
$Black=imagecol orallocate($map ,0,0,0);
$drawMode='';
imagefilledarc( $map,$x,$y,10,1 0,0,360,$Black, IMG_ARC_PIE);
imagejpeg($map, "nodedMap.jpg") ;
mysql_query("in sert into nodeinfo values ('',$x,$y)");
return ;
}
and i call this function by this insturction:
<input name="img" type="image" src="nodedMap.J PG" width="569"
height="290" border="0" onClick="<? drawNode($drawM ode); ?> " >
Comment