title: redirect to different URL with same form
body: <p>i am new to PHP and trying to arrive with similar <a href="http://bankifsccode.com/BASSEIN_CATHOLIC_CO-OP_BANK_LTD" rel="nofollow">functionality given in URL</a>.</p>
  
  <p>i have a form with four select options, result will be retrived when last option selected.</p>
  
  <p>my current code is : </p>
  
  <pre><code>{
    $result = mysql_query($query,$con);
  
    if(!$result)    
      echo mysql_error();
  
    $option = "";
  
    while($row = mysql_fetch_assoc($result)) {
      $option .= '&lt;option value = "'.str_replace(' ', '_', $row['bankname']).'"&gt;'.$row['bankname'].'&lt;/option&gt;';
    }
  
    str_replace(' ', '_', $row['bankname'])  
  ?&gt;
  
  &lt;form method = "POST" action = ""&gt;
  
  &lt;select name = "bank" onChange="document.location.href=bank[selectedIndex].value"&gt;
  &lt;?php echo $option; ?&gt; 
  
  &lt;/select&gt;
  
  &lt;/form&gt;
  
  }
  </code></pre>
  
  <p>Probably i am asking very high level question, but please help.</p>
  
  <p>Regards,
  Anitha</p>