html section:
<form method="get" action="scripts/stateforms.php">
<div class="line"></div>
<div class="bySt">
<select name="States" class="state_select">
<option selected="selected" value="">Browse by State</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DC">D.C.</option>
<option value="DE">Delaware</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="WY">Wyoming</option>
</select></div>
<div class="line"></div>
<div class="p">
<input type="image" img src="images/button_findNow.gif" value="submit" alt="Find Surgeon" border="0" /></form>
------
<?php
if (!empty($_REQUEST['States']))
{
$url = array(
'AL'=>'http://www.example.com/alabama.html',
'AK'=>'http://www.example.com/arkansas.html',
'AZ'=>'http://www.example.com/arizona.html',
'AR'=>'http://www.example.com/arkansas.html',
'CA'=>'http://www.example.com/california.html',
'CO'=>'http://www.example.com/colorado.html',
'CT'=>'http://www.example.com/connecticut.html',
'DC'=>'http://www.example.com/washington_dc.html',
'DE'=>'http://www.example.com/delaware.html',
'FL'=>'http://www.example.com/florida.html',
'GA'=>'http://www.example.com/georgia.html',
'HI'=>'http://www.example.com/hawaii.html',
'ID'=>'http://www.example.com/idaho.html_',
'IL'=>'http://www.example.com/illinois.html',
'IN'=>'http://www.example.com/indiana.html',
'IA'=>'http://www.example.com/iowa.html',
'KS'=>'http://www.example.com/kansas.html',
'KY'=>'http://www.example.com/kentucky.html',
'LA'=>'http://www.example.com/louisiana.html',
'ME'=>'http://www.example.com/maine.html',
'MD'=>'http://www.example.com/maryland.html',
'MA'=>'http://www.example.com/massachusetts.html',
'MI'=>'http://www.example.com/michigan.html',
'MN'=>'http://www.example.com/minnesota.html_',
'MS'=>'http://www.example.com/mississippi.html',
'MO'=>'http://www.example.com/missouri.html',
'MT'=>'http://www.example.com/montana.html',
'NE'=>'http://www.example.com/nebraska.html',
'NV'=>'http://www.example.com/nevada.html',
'NH'=>'http://www.example.com/new_hampshire.html',
'NJ'=>'http://www.example.com/new_jersey.html',
'NM'=>'http://www.example.com/new_mexico.html',
'NY'=>'http://www.example.com/new_york.html',
'NC'=>'http://www.example.com/north_carolina.html',
'ND'=>'http://www.example.com/north_dakota.html',
'OH'=>'http://www.example.com/ohio.html',
'OK'=>'http://www.example.com/oklahoma.html',
'OR'=>'http://www.example.com/oregon.html',
'PA'=>'http://www.example.com/pennsylvania.html',
'RI'=>'http://www.example.com/rhode_island.html',
'SC'=>'http://www.example.com/south_carolina.html',
'SD'=>'http://www.example.com/south_dakota.html',
'TN'=>'http://www.example.com/tennessee.html',
'TX'=>'http://www.example.com/texas.html',
'UT'=>'http://www.example.com/utah.html',
'VT'=>'http://www.example.com/vermont.html',
'VA'=>'http://www.example.com/virginia.html',
'WA'=>'http://www.example.com/washington.html',
'WV'=>'http://www.example.com/west_virginia.html',
'WI'=>'http://www.example.com/wisconsin.html',
'WY'=>'http://www.example.com/wyoming.html');
if (!empty($_REQUEST['States'])) {
$qs = $_SERVER['QUERY_STRING'];
$url .= '?' . $qs;
header("location: $url");
}
?>
This may be important. it is an html extension page not php but I already have the “addhandler” in the htaccess file.
This code is partly from stackoverflow so it is a cut & paste job but there has to be a viable way (no javascript)