title: Keep selected option (form/select) after refresh
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8704066/html-select-option-lost-data-after-submit">Html select option lost data after submit</a>  </p>
  </blockquote>
  
  
  
  <p>I have a select menu that should keep the selected option after the page refresh. This is the example:</p>
  
  <pre><code>&lt;select id="form_frame" name="frame" onchange="getData(this);"/&gt;
     &lt;option value="data1" selected="selected"&gt;Data 1&lt;/option&gt;
     &lt;option value="data2"&gt;Data 2&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Function getData just pull info to the user.</p>
  
  <p>I'm using Smarty/php for the dynamic content.</p>
  
  <p>Open to advice, thanks!</p>