title: Preserving a select option after PHP submit
body: <p>I have a html select box with a list of countries. When I select one, it posts to the PHP method with no problem, but the select box resets to the top. How can I preserve the value that the user selected here? My code is here (for brevity's sake, I've taken out most of the other countries)</p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
          &lt;form action="" method="post"&gt;
              &lt;select name="countryCd"  onChange="submit();return false;"&gt;
                  &lt;option value="AFG"&gt;Afghanistan&lt;/option&gt;
                  &lt;option value="ALA"&gt;Aland Islands&lt;/option&gt;
                  &lt;option value="ALB"&gt;Albania&lt;/option&gt;
              &lt;/select&gt;
          &lt;/form&gt;
  
      &lt;?php echo $_POST["countryCd"]; ?&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>