The way I approach this is to use MapServer to get the coordinates (or an id of a PostGIS feature) interactively and then connect to PostGIS directly with PHP and pull the information out using their well developed functions, such as:
<br>&nbsp; - <span class="term">PolyFromText(...)<br>&nbsp; - </span><span class="term">Buffer(...)<br>&nbsp; - Intersect(...)<br><br>This is one method, there are many others.<br><br>Aaron<br></span><br><div><span class="gmail_quote">On 12/8/06, 
<b class="gmail_sendername">Sievers, Jason</b> &lt;<a href="mailto:jsievers@co.linn.or.us">jsievers@co.linn.or.us</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">







<div>

<p><font size="2">I want to perform a buffer query around a polygon.&nbsp; I would select a polygon, then get features from another layer who are within a specified distance of the outside edge of my selected polygon.&nbsp; The only queries involving buffers I see in the documentation are on points.&nbsp; I have looked briefly at PostGIS and GRASS documentation.&nbsp; Is the solution possible in MapServer? or should I investigate PostGIS, GRASS, or other tools?
</font></p>

<p><font size="2">Thanks for any help.</font>
</p>
<br>

<p><font size="2">Jason Sievers</font>
<br><font size="2"><a href="mailto:jsievers@co.linn.or.us" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jsievers@co.linn.or.us</a></font>
</p>

</div>

</blockquote></div><br><br clear="all"><br>-- <br>+-------------------------------------------------<br>|&nbsp;&nbsp;Aaron Koning<br>|&nbsp;&nbsp;Information Technologist<br>|&nbsp;&nbsp;Prince George, BC, Canada.<br>+-------------------------------------------------
<br>|&nbsp;&nbsp;Flexible Internet Spatial Template:<br>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://fist-mapping.org">http://fist-mapping.org</a><br>+-------------------------------------------------