CGI Mapserver: php template?

BONNER S KARGER bskarger at STUDENTS.WISC.EDU
Tue Aug 17 09:38:22 EDT 2004


I gave this a try, and it does work. Although, my objective was to keep the user in the "map" page, and not a query results page. I want to do the querying, and display results alongside the map, not in a new window that obscures the map. A meta-redirect on to the "map" page won't do what I'm looking for either.

It sure would be easy if I could put my php script right in with the map output page...unfortunately something with the CGI doesn't allow the php to be processed.

Any ideas?

Thank you



----- Original Message -----
From: Steve Lime <steve.lime at DNR.STATE.MN.US>
Date: Monday, August 16, 2004 4:29 pm
Subject: Re: [UMN_MAPSERVER-USERS] CGI Mapserver: php template?

> You'd do this using a URL template. Let's say you want to click on a
> polygon, get its ID and
> then generate a report out of MySQL. Well, MapServer will get you the
> right ID and can pass
> that along to another script (in PHP), but you'll have to right
> the PHP
> script. Sounds like you
> know that part. So, if you have a script called report.phtml you could
> write a template like:
>
>  TEMPLATE "http://yourserver.wisc.edu/report.phtml?id=[ID]"
>
> You basically end up stringing queries together. Make sense?
>
> Steve
>
> >>> BONNER S KARGER <bskarger at STUDENTS.WISC.EDU> 8/16/2004 3:52:37 PM
> >>>
> Hello listers,
>
> When using the CGI MapServer, is it possible to send query results to
> multiple files? I'm trying to send CGI query results to two different
> files, one .html and one .php. Can this be done? According to the
> TEMPLATE documentation, it can take only 1 file, or a URI.
>
> I'm trying to grab a query result (from a .dbf) and use php to send
> that result to MySQL for a DB query.  I cannot use ODBC connection,
> hence the use of php.
>
> Any ideas?
>
> Thanks
>
> -------------------------------------
> Bonner Karger
> Soils Extension, UW-Madison
> 1525 Observatory Drive
> Madison, WI 53706
> bskarger at wisc.edu
>



More information about the mapserver-users mailing list