AddPoints won't work

Frank Broniewski liste at GEO-DIENSTLEISTUNG.DE
Fri Mar 2 01:36:43 EST 2007


Hi

did you try to do print_r($_POST) to see what $_POST[mode] holds as a value? 
Maybe you have a typo somewhere. And you don't need the extra brackets around 
$_POST.

Best whishes 

Frank

Am Donnerstag, 1. März 2007 14:12 schrieb theresia freska:
> hi list,
> 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.
>
> if (($_POST['mode']) == "nquery") {
>    do_the_function;
> }
>
> 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.
>
> if ($_POST['mode'] == "nquery") {
>         /*$inputLayer = $_POST['slcQlayer'];
>         $radius = abs($_POST['radius']);
>
>         if (!(in_array($inputLayer, $tesLayer))) {
>             echo "<script language='Javascript'>alert('Layer $inputLayer
> tidak aktif. Query tidak akan dilanjutkan.')</script>"; } else {
>             $nearby = nearbyResto($qpoint, $map, $radius, $inputLayer);
>             $arrRes = getInfo($inputLayer, $nearby);
>             $result_table = tabelResto($arrRes);*/
>
>             $conn = pg_connect("dbname=$database user=$user
> password=$password host=$host"); $m=0;
>             $res_layer = pg_query("select gid from point where
> kategori='Pasar'"); while($row_layer = pg_fetch_row($res_layer)) {
>                 $arr_layer[$m] = $row_layer;
>                 $m++;
>             }
>
>             for ($i=0;$i<count($arr_layer);$i++) {
>                 $baris = $arr_layer[$i];
>                 $res = pg_query("select kategori, x(the_geom), y(the_geom)
> from point where gid=$baris[0]"); $row = pg_fetch_row($res);
>                 $arr[$i] = $row;
>             }
>
>             AddPoints($map, $arr);
>
>     }
>
>
> ---------------------------------
> Want to start your own business? Learn how on Yahoo! Small Business.

-- 
Softwaredienstleistungen

Frank Broniewski
Cloefstraße 76a
66693 Mettlach

Email: frank at geo-dienstleistung.de
WWW: http://www.geo-dienstleistung.de/



More information about the mapserver-users mailing list