<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Itemquery problem</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hi all,</FONT>
<BR><FONT SIZE=2>I'm having problems using the itemquery mode of Mapserver 3.6.1. I'm wanting to have a text box which the user enters a postcode, which then queries a shapefile containing postcode points. This then returns a query map of that area. At least to start anyway.</FONT></P>

<P><FONT SIZE=2>Whatever I do and whatever is entered, itemquery returns the first record, and itemnquery returns all the records.</FONT>
</P>

<P><FONT SIZE=2>What am I doing wrong? Any help would be appreciated, especially if it includes examples of how to do it right!!</FONT>
</P>

<P><FONT SIZE=2>Matt Hatcher</FONT>
</P>
<BR>

<P><FONT SIZE=2>&lt;-- test.html --&gt;</FONT>
<BR><FONT SIZE=2>&lt;html&gt;</FONT>
<BR><FONT SIZE=2>&lt;body&gt;</FONT>
<BR><FONT SIZE=2>Enter postcode:</FONT>
</P>

<P><FONT SIZE=2>&lt;form method=&quot;get&quot; action=&quot;/cgi-bin/mapserv.exe&quot;&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;input type=&quot;hidden&quot; name=&quot;map&quot; value=&quot;test.map&quot;&gt;</FONT>
<BR><FONT SIZE=2>&lt;input type=&quot;hidden&quot; name=&quot;map_web_imagepath&quot; value=&quot;\Inetpub\wwwroot\tmp\&quot;&gt;</FONT>
<BR><FONT SIZE=2>&lt;input type=&quot;hidden&quot; name=&quot;map_web_imageurl&quot; value=&quot;/tmp/&quot;&gt;</FONT>
<BR><FONT SIZE=2>&lt;input type=&quot;hidden&quot; name=&quot;program&quot; value=&quot;/cgi-bin/mapserv.exe&quot;&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;input type=&quot;hidden&quot; name=&quot;mode&quot; value=&quot;itemnquery&quot;&gt;</FONT>
<BR><FONT SIZE=2>&lt;input type=&quot;hidden&quot; name=&quot;qlayer&quot; value=&quot;postcodes&quot;&gt;</FONT>
<BR><FONT SIZE=2>&lt;input type=&quot;hidden&quot; name=&quot;item&quot; value=&quot;PCODE&quot;&gt;</FONT>
<BR><FONT SIZE=2>&lt;input type=&quot;hidden&quot; name=&quot;mapext&quot; value=&quot;shapes&quot;&gt;</FONT>
<BR><FONT SIZE=2>&lt;input type=&quot;hidden&quot; name=&quot;buffer&quot; value=&quot;1000&quot;&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;input type=&quot;text&quot; name=&quot;value&quot; size=&quot;10&quot; value=&quot;&quot;&gt;</FONT>
<BR><FONT SIZE=2>&lt;input type=&quot;submit&quot; value=&quot;Go!&quot;&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;/form&gt;</FONT>
<BR><FONT SIZE=2>&lt;/body&gt;</FONT>
<BR><FONT SIZE=2>&lt;/html&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;-- test.map (the relevant bits!) --&gt;</FONT>
</P>

<P><FONT SIZE=2>QUERYMAP</FONT>
<BR><FONT SIZE=2>&nbsp; SIZE 300 300</FONT>
<BR><FONT SIZE=2>&nbsp; STATUS ON</FONT>
<BR><FONT SIZE=2>&nbsp; STYLE HILITE</FONT>
<BR><FONT SIZE=2>&nbsp; COLOR 255 0 0</FONT>
<BR><FONT SIZE=2>END</FONT>
</P>

<P><FONT SIZE=2>LAYER</FONT>
<BR><FONT SIZE=2>&nbsp; NAME &quot;postcodes&quot;</FONT>
<BR><FONT SIZE=2>&nbsp; TYPE POINT</FONT>
<BR><FONT SIZE=2>&nbsp; STATUS OFF</FONT>
<BR><FONT SIZE=2>&nbsp; DATA postcodes</FONT>
</P>

<P><FONT SIZE=2>&nbsp; TEMPLATE &quot;query.html&quot;</FONT>
<BR><FONT SIZE=2>&nbsp; FILTER &quot;PCODE&lt;&gt;''&quot;</FONT>
<BR><FONT SIZE=2>&nbsp; </FONT>
<BR><FONT SIZE=2>&nbsp; CLASS</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; COLOR 192 192 192</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; SYMBOL &quot;circle&quot;</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; SIZE 3</FONT>
<BR><FONT SIZE=2>&nbsp; END</FONT>
<BR><FONT SIZE=2>END</FONT>
</P>

<P><FONT SIZE=2>&lt;-- end --&gt;</FONT>
</P>

<CODE><FONT SIZE=3><BR>
<BR>
**********************************************************************<BR>
The information contained in this email and any subsequent<BR>
 correspondence is private and is intended solely for the <BR>
intended recipient(s). For those other than the intended<BR>
 recipient(s) any disclosure, copying, distribution, or any <BR>
action taken or omitted to be taken in reliance on such <BR>
information is prohibited and may be unlawful.<BR>
**********************************************************************<BR>
</FONT></CODE>
</BODY>
</HTML>