CGI Mapserver: php template?

BONNER S KARGER bskarger at STUDENTS.WISC.EDU
Mon Aug 16 18:43:57 EDT 2004


Thanks Steve, I'll give it a try.

So, to use [ID] in the "report.phtml" page, I would create a php variable such as:
$id = $_GET['ID'];  correct?

I'm planning to put the "report.phtml" page in an <iframe> on the main mapping page. This should work, no?

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