<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/1.0.3">
</HEAD>
<BODY>
Hi List,
<BR>
Hopefully somebody can point me in the right direction.
<BR>
I am using mapserv 3.6.0 and php/mapscript with php 4.1.2 as CGI.
<BR>

<BR>
I am having trouble with the processquerytemplate method.
<BR>
I can get it to process a layers template when the template is a file but when the template is a URL I get nothing returned.&nbsp; I would assume that I am meant to get the template URL back as a string with the specified tags replaced with their actual value.&nbsp; Have I got the layer set up correctly?&nbsp; Am I calling it correctly in php?
<BR>

<BR>
##### Layer #######
<BR>
LAYER
<BR>
&nbsp; NAME parcels_shaded
<BR>
&nbsp; GROUP cadaster
<BR>
&nbsp; CONNECTIONTYPE postgis
<BR>
&nbsp; CONNECTION &quot;user=gis dbname=blis host=blis&quot;
<BR>
&nbsp; TYPE polygon
<BR>
&nbsp; STATUS on
<BR>
&nbsp; MAXSCALE 9999
<BR>
&nbsp; DATA &quot;geom from bucc&quot;
<BR>
&nbsp; LABELITEM &quot;tag&quot;
<BR>
&nbsp; HEADER parcels_header.html
<BR>
&nbsp; FOOTER parcels_footer.html
<BR>
&nbsp; TEMPLATE &quot;parcels.html&quot;
<BR>
&nbsp; #TEMPLATE &quot;<A HREF="http://blis/blis/action.php?action=query&value=[">http://blis/blis/action.php?action=query&amp;value=[</A>tag]&amp;image=[img]&quot;
<BR>
&nbsp; CLASS
<BR>
&nbsp;&nbsp;&nbsp;&nbsp; Name &quot;Parcels&quot;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 128 0
<BR>
&nbsp; END
<BR>
END
<BR>

<BR>
#### Php ########
<BR>
 $queryresult = $map-&gt;queryByPoint($query_point,MS_SINGLE,5);
<BR>
 echo $queryresult . &quot;&lt;br&gt;&quot;;
<BR>
 $queryimg = $map-&gt;drawquery();
<BR>
 $query_url=$queryimg-&gt;saveWebImage(MS_PNG,1,1,0);
<BR>
 $queryarray[&quot;test&quot;] = &quot;steve&quot;;
<BR>
 $template = $map-&gt;processquerytemplate($queryarray);
<BR>
echo &quot;&lt;hr&gt;&quot;;
<BR>
echo $template;
<BR>
echo &quot;&lt;hr&gt;&quot;;
<BR>
Even though the [tag] tag isn't in the queryarray that gets passed to processquerytemplate, it still substitutes the correct values into the template file, I just had to pass something to it to get it to work.
<BR>
The commented out template line in the layer doesn't return anything where the uncommented template does.
<BR>

<BR>
Any help would be greatly appreciated.
<BR>
Thanks
<BR>
Steve
<BR>

<BR>
~~~~~~~~~~~~~~~~~~~~~~~~
<BR>
Steven Bowden
<BR>
GIS Officer
<BR>
Bundaberg City Council
<BR>
~~~~~~~~~~~~~~~~~~~~~~~~~
<BR>

</BODY>
</HTML>