how to retain selected values in Select field after form submission?
<p>i have a main page that i used in uploading tickets to db, i have  Select field that i want to retain the value that the user selected prior to submitting the form but its not happening...</p>

<p>here is my code for select field:</p>

<pre><code>&lt;select name="XiD" id="XiD"&gt;
&lt;option value="Blank" selected="selected"&gt;Please Select...&lt;/option&gt;
&lt;option value="AAA"&gt;AAA&lt;/option&gt;
&lt;option value="BBB"&gt;BBB&lt;/option&gt;
&lt;option value="CCC"&gt;CCC&lt;/option&gt;
&lt;option value="DDD"&gt;DDD&lt;/option&gt;
&lt;option value="EEE"&gt;EEE&lt;/option&gt;
&lt;option value="FFF"&gt;FFF&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>just to add, this Xid is being posted prior to submitting</p>

<pre><code>$XiD = $_POST['XiD'];
</code></pre>

<p>and i try to use this script:</p>

<p><strong>UPDATE</strong> - changed from $_GET to $_POST but still not working...</p>

<pre><code>&lt;script type="text/javascript"&gt;
  document.getElementById('XiD').value = "&lt;?php echo $_POST['XiD'];?&gt;";
&lt;/script&gt;
</code></pre>

<p>my jquery version im using: jquery-ui-1.10.2 and jquery-1.9.1</p>
