hi list,<br>i have a function to add points dynamically. it works on the A data, but not on the B data. yet i have copied the same code. this function works as user selects the nquery mode.<br><br>if (($_POST['mode']) == "nquery") {<br> do_the_function;<br>}<br><br>the strange thing is that when i eliminate the if condition, it works just fine. i don't know where i did the wrong code. can someone point that out for me? i use mapserver 4.8.3. i use this code to debug. thanks in advance.<br><br>if ($_POST['mode'] == "nquery") {<br> /*$inputLayer = $_POST['slcQlayer'];<br> $radius = abs($_POST['radius']);<br> <br> if (!(in_array($inputLayer, $tesLayer))) {<br> echo "<script language='Javascript'>alert('Layer $inputLayer tidak aktif. Query tidak akan
dilanjutkan.')</script>";<br> } else {<br> $nearby = nearbyResto($qpoint, $map, $radius, $inputLayer);<br> $arrRes = getInfo($inputLayer, $nearby);<br> $result_table = tabelResto($arrRes);*/<br> <br> $conn = pg_connect("dbname=$database user=$user password=$password host=$host");<br> $m=0;<br> $res_layer = pg_query("select gid from point where kategori='Pasar'");<br> while($row_layer = pg_fetch_row($res_layer)) {<br>
$arr_layer[$m] = $row_layer;<br> $m++;<br> }<br> <br> for ($i=0;$i<count($arr_layer);$i++) {<br> $baris = $arr_layer[$i];<br> $res = pg_query("select kategori, x(the_geom), y(the_geom) from point where gid=$baris[0]");<br> $row = pg_fetch_row($res);<br> $arr[$i] = $row;<br> }<br><br>
AddPoints($map, $arr);<br> <br> }<br><p>
<hr size=1>Want to start your own business? Learn how on <a href="http://us.rd.yahoo.com/evt=41244/*http://smallbusiness.yahoo.com/r-index">Yahoo! Small Business.</a>