title: MapServer cgi-bin get value from query string and concatenate to Postgres query
body: <p>I'm working with cgi-bin and I show a map with some data from a Postgres database.</p>
  
  <p>But, I need to introduce an input where the user could select a date and this date would filter the results from the database.</p>
  
  <p>I have the input and I send the parameter by the URL (get method), but I don't know how to get this parameter from the cgi-bin query string and how to concatenate the parameter's value to the database query.</p>
  
  <p>This is the mapfile's code portion: </p>
  
  <pre><code>LAYER
  DATA "the_geom from (select * from
    vista_puntos where date &gt; &lt;DATE_VAR_FROM_QUERY_STRING&gt;) as subquery
    using unique id_valor using srid=4326"
  </code></pre>