Pass select list to php page
<p>I am currently trying to pass a select list (the whole list) into a php page and grabbing the individual values from the list to do a dynamic sql query. I pass in selectItems, but when I perform an echo, I get </p>

<blockquote>
  <p>[object HTMLSelectElement]</p>
</blockquote>

<p>I have also tried passing in selectItems.value, but that only passes in one of the 3 list items.I have searched for the past day and I haven't had much success. I'm not too sure how to approach this. Any help would be greatly appreciated. </p>

<p>The current select list is as follows</p>

<pre><code>    &lt;select multiple name="selectItems" size="6" id="selectItems"&gt;
    &lt;option value="value1" selected="selected"&gt;value1&lt;/option&gt;
    &lt;option value="value2" &gt;value2&lt;/option&gt;
    &lt;option value="value3" &gt;value3&lt;/option&gt;
    &lt;/select&gt;

    &lt;input type=button id="opener" value='Clickme' onclick="showTable(selectItems, 'getquery.php')"&gt;
</code></pre>

<p>A snippet from the showtable function below, I am basically trying to pass the list (denoted by q) and the location of the page.</p>

<pre><code>xmlhttp.open("GET",page+"?q="+str,true);
xmlhttp.send();
</code></pre>
