<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>Using CGI variables in map files</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">The documentation of Mapserver says this:</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Variables can be substituted within MapFile parameter values. At this time, cookie and CGI parameter values are supported. This allows MapServer MapFiles to be aware of a user's cookies (good for implementing security), or non-MapServer request parameters (good for integrating with other systems).</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">Syntax: '%' + variable name + '%'</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">But the examples are not clear.&nbsp; If I want to pass in a CGI variable, such as [mapx] and [mapy], into a data statement to select from a postGIS database; such as:</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONNECTIONTYPE postgis</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp; CONNECTION &quot;user=auser dbname=mydb host=myserver&quot;</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp; STATUS ON</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">&nbsp; DATA &quot;counties from states where thislon = %mapx% and thislat = %mapy%&quot;</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Does not seem to work.&nbsp; Help?</FONT></SPAN></P>
<BR>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Chip Taylor</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Prepared Response, Inc. </FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">1127 Broadway Plaza, Suite 204</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Tacoma, WA&nbsp; 98402</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">O 253.272.1730</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">M 253.948.2525</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">STATEMENT OF CONFIDENTIALITY</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify Prepared Response, Inc. immediately at (206) 223-5544 and destroy all copies of this message and any attachments.</FONT></SPAN></P>
<BR>
<BR>
<BR>

</BODY>
</HTML>