title: how to echo select option value in the php page without AJAX?
body: <p>I need to find a way to echo the selected option value in the page.</p>
  
  <p>I do not want to use AJAX or javascript if possible. </p>
  
  <p>is this possible using PHP only?</p>
  
  <p>basically when an option is selected, the value of that option should be echo-ed on the page.</p>
  
  <p>My current code is this:</p>
  
  <pre><code>&lt;select name="userpages" id="upages"&gt;
      &lt;?php
      foreach ($postResults as $postResult) {
              echo '&lt;option value="'.$postResult["page_id"].'"&gt;'.$postResult["name"].'&lt;/option&gt;';
          }
  
      ?&gt;
  &lt;/select&gt;
  
  &lt;?php echo $postResult["page_id"]; ?&gt;
  </code></pre>
  
  <p>this code will only echo the first selected option value and it won't echo the rest of them if they are selected.</p>
  
  <p>could someone please help me out with this?</p>
  
  <p>any help would be appreciated. </p>