[mapserver-users] customize queries. (FWD)

E Perik erwin at perik.nu
Sat May 18 08:51:39 EDT 2002


Gerald,

regarding ths dropdown list:

Using PHP the following would produce a list of records of a specific
field:

* Place in html-section of a php-file *

<select name="ParkList" >
  <option>Select Item</option>
  <option>- - - - - - - - - - - - - - -</option>
  <?php GetDbaseValueList("YourLocation\\YourName.dbf", "YourFieldName")
?>
</select>


* Place anywhere in a php-section *

//
-----------------------------------------------------------------------
// Get the data of a specified column of a .dbf database to a
option-list
//
-----------------------------------------------------------------------
function GetDbaseValueList($dbfname, $NameOfColumn)
{
   if ($db)
       dbase_close($db);
   {
       $db = dbase_open($dbfname, 0);
   }
  $row = dbase_numrecords($db);
  for ($i=1; $i <= $row; $i++) 
  {
     $rec = dbase_get_record_with_names($db,$i);
     $string = trim($rec[$NameOfColumn]);
     echo "<OPTION value=\"$i\">$string</OPTION>\n";
   }
   dbase_close($db);
} //:-



Now zooming to the object should be easy....

Erwin





-----Original Message-----
From: owner-mapserver-users at lists.gis.umn.edu
[mailto:owner-mapserver-users at lists.gis.umn.edu] On Behalf Of Thomas E.
Burk
Sent: zaterdag 18 mei 2002 3:54
To: mapserver-users at lists.gis.umn.edu
Cc: gerald80 at eudoramail.com
Subject: [mapserver-users] customize queries. (FWD)


------------- Begin Forwarded Message -------------

To: mapserver-info at lists.gis.umn.edu
Date: Thu, 16 May 2002 02:21:04 -0700
From: "gerald g villacarlos" <gerald80 at eudoramail.com>
Mime-Version: 1.0
X-Sent-Mail: off
Subject: customize queries.
X-Sender-Ip: 203.177.42.133
Content-Language: en
Content-Transfer-Encoding: 7bit

hello there, i got a question regarding inquery, i like to 
customize my search using a list of predefined places in a 
dropdown list,say example a list of towns are listed in a 
dropdown list, when a particular user selects a particular town, 
he is then zoom to that place, is it possible to do this?, what 
are the things i need to add in my scripts?, 
any suggestions or example.

thank you.

gerald


Join 18 million Eudora users by signing up for a free Eudora 
Web-Mail account at http://www.eudoramail.com

------------- End Forwarded Message -------------





More information about the mapserver-users mailing list