title: PHP: on select change, post form to self
body: <p>It's basically what the title says.. I have a form with a select control that I want to force the form to post back to self on change. </p>
  
  <pre><code>$bmsclientlist = $clientobj-&gt;getBMSClientList();
  
  echo '&lt;form name="changebmsid" method="post" action="' . $_SERVER['PHP_SELF'] . '"&gt;&lt;select name="bmsid"&gt;';
  
  foreach($bmsclientlist as $bmsclient) {
      $var = '';
      if($client['bmsid'] == $bmsclient['id']) {
          $var = ' selected="selected"';
      }
      echo '&lt;option value="' . $bmsclient['id'] .'"'. $var .'&gt;' .$bmsclient['clientname'] . '&lt;/option&gt;';
  }
  
  echo '&lt;/select&gt;&lt;/form&gt;';
  
  $backupobj = new AdminBackup();
  
  if(isset($_POST['bmsid']){
      $statusarray = $backupobj-&gt;getStatusTotalsbyId($_POST['bmsid']);
  }else{
      $statusarray = $backupobj-&gt;getStatusTotals();
  }
  </code></pre>
  
  <p>I know it's going to involve some javascript but I'm not too sure how to achieve this.</p>
  
  <p>Any help most appreciated!</p>
  
  <p>Thanks,</p>
  
  <p>Jonesy</p>