title: How to get select value on same page without clicking submit
body: <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form action="" method="post"&gt;
          &lt;select name="state" &gt;
              &lt;option value="GOA"&gt;1. GOA&lt;/option&gt;
              &lt;option value="Gujarat"&gt;2. Gujarat&lt;/option&gt;
              &lt;option value="Rajasthan"&gt;3. Rajasthan&lt;/option&gt;
          &lt;/select&gt; 
          &lt;input type="submit" value="Submit"&gt;
      &lt;/form&gt;
  &lt;?php 
  if($_SERVER["REQUEST_METHOD"] == "POST"){
      $st = $_POST["state"];
      echo $st; 
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want <code>state</code> value in <code>$st</code> variable by selecting option but without click on submit button. Any suggestions would be appreciated.</p>