Please tell me there is a better way of doing this?
<pre><code>&lt;label for="state" class="medium"&gt;State&lt;/label&gt;
&lt;select name="state"&gt;
    &lt;option value="" &lt;?php if($_POST['state'] =="") { echo "SELECTED";} ?&gt;&gt;-- Select State --&lt;/option&gt;
    &lt;option value="AL" &lt;?php if($_POST['state'] =="AL") { echo "SELECTED";} ?&gt;&gt;Alabama&lt;/option&gt;
    &lt;option value="AK" &lt;?php if($_POST['state'] =="AK") { echo "SELECTED";} ?&gt;&gt;Alaska&lt;/option&gt;
    &lt;option value="AZ" &lt;?php if($_POST['state'] =="AZ") { echo "SELECTED";} ?&gt;&gt;Arizona&lt;/option&gt;
    &lt;option value="AR" &lt;?php if($_POST['state'] =="AR") { echo "SELECTED";} ?&gt;&gt;Arkansas&lt;/option&gt;
    &lt;option value="CA" &lt;?php if($_POST['state'] =="CA") { echo "SELECTED";} ?&gt;&gt;California&lt;/option&gt;
    &lt;option value="CO" &lt;?php if($_POST['state'] =="CO") { echo "SELECTED";} ?&gt;&gt;Colorado&lt;/option&gt;
    &lt;option value="CT" &lt;?php if($_POST['state'] =="CT") { echo "SELECTED";} ?&gt;&gt;Connecticut&lt;/option&gt;
    &lt;option value="DE" &lt;?php if($_POST['state'] =="DE") { echo "SELECTED";} ?&gt;&gt;Delaware&lt;/option&gt;
    &lt;option value="DC" &lt;?php if($_POST['state'] =="DC") { echo "SELECTED";} ?&gt;&gt;District of Columbia&lt;/option&gt;
    &lt;option value="FL" &lt;?php if($_POST['state'] =="FL") { echo "SELECTED";} ?&gt;&gt;Florida&lt;/option&gt;
    &lt;option value="GA" &lt;?php if($_POST['state'] =="GA") { echo "SELECTED";} ?&gt;&gt;Georgia&lt;/option&gt;
    &lt;option value="HI" &lt;?php if($_POST['state'] =="HI") { echo "SELECTED";} ?&gt;&gt;Hawaii&lt;/option&gt;
    &lt;option value="ID" &lt;?php if($_POST['state'] =="ID") { echo "SELECTED";} ?&gt;&gt;Idaho&lt;/option&gt;
    &lt;option value="IL" &lt;?php if($_POST['state'] =="IL") { echo "SELECTED";} ?&gt;&gt;Illinois&lt;/option&gt;
    &lt;option value="IN" &lt;?php if($_POST['state'] =="IN") { echo "SELECTED";} ?&gt;&gt;Indiana&lt;/option&gt;
    &lt;option value="IA" &lt;?php if($_POST['state'] =="IA") { echo "SELECTED";} ?&gt;&gt;Iowa&lt;/option&gt;
    &lt;option value="KS" &lt;?php if($_POST['state'] =="KS") { echo "SELECTED";} ?&gt;&gt;Kansas&lt;/option&gt;
    &lt;option value="KY" &lt;?php if($_POST['state'] =="KY") { echo "SELECTED";} ?&gt;&gt;Kentucky&lt;/option&gt;
    &lt;option value="LA" &lt;?php if($_POST['state'] =="LA") { echo "SELECTED";} ?&gt;&gt;Louisiana&lt;/option&gt;
    &lt;option value="ME" &lt;?php if($_POST['state'] =="ME") { echo "SELECTED";} ?&gt;&gt;Maine&lt;/option&gt;
    &lt;option value="MD" &lt;?php if($_POST['state'] =="MD") { echo "SELECTED";} ?&gt;&gt;Maryland&lt;/option&gt;
    &lt;option value="MA" &lt;?php if($_POST['state'] =="MA") { echo "SELECTED";} ?&gt;&gt;Massachusetts&lt;/option&gt;
    &lt;option value="MI" &lt;?php if($_POST['state'] =="MI") { echo "SELECTED";} ?&gt;&gt;Michigan&lt;/option&gt;
    &lt;option value="MN" &lt;?php if($_POST['state'] =="MN") { echo "SELECTED";} ?&gt;&gt;Minnesota&lt;/option&gt;
    &lt;option value="MS" &lt;?php if($_POST['state'] =="MS") { echo "SELECTED";} ?&gt;&gt;Mississippi&lt;/option&gt;
    &lt;option value="MO" &lt;?php if($_POST['state'] =="MO") { echo "SELECTED";} ?&gt;&gt;Missouri&lt;/option&gt;
    &lt;option value="MT" &lt;?php if($_POST['state'] =="MT") { echo "SELECTED";} ?&gt;&gt;Montana&lt;/option&gt;
    &lt;option value="NE" &lt;?php if($_POST['state'] =="NE") { echo "SELECTED";} ?&gt;&gt;Nebraska&lt;/option&gt;
    &lt;option value="NV" &lt;?php if($_POST['state'] =="NV") { echo "SELECTED";} ?&gt;&gt;Nevada&lt;/option&gt;
    &lt;option value="NH" &lt;?php if($_POST['state'] =="NH") { echo "SELECTED";} ?&gt;&gt;New Hampshire&lt;/option&gt;
    &lt;option value="NJ" &lt;?php if($_POST['state'] =="NJ") { echo "SELECTED";} ?&gt;&gt;New Jersey&lt;/option&gt;
    &lt;option value="NM" &lt;?php if($_POST['state'] =="NM") { echo "SELECTED";} ?&gt;&gt;New Mexico&lt;/option&gt;
    &lt;option value="NY" &lt;?php if($_POST['state'] =="NY") { echo "SELECTED";} ?&gt;&gt;New York&lt;/option&gt;
    &lt;option value="NC" &lt;?php if($_POST['state'] =="NC") { echo "SELECTED";} ?&gt;&gt;North Carolina&lt;/option&gt;
    &lt;option value="ND" &lt;?php if($_POST['state'] =="ND") { echo "SELECTED";} ?&gt;&gt;North Dakota&lt;/option&gt;
    &lt;option value="OH" &lt;?php if($_POST['state'] =="OH") { echo "SELECTED";} ?&gt;&gt;Ohio&lt;/option&gt;
    &lt;option value="OK" &lt;?php if($_POST['state'] =="OK") { echo "SELECTED";} ?&gt;&gt;Oklahoma&lt;/option&gt;
    &lt;option value="OR" &lt;?php if($_POST['state'] =="OR") { echo "SELECTED";} ?&gt;&gt;Oregon&lt;/option&gt;
    &lt;option value="PA" &lt;?php if($_POST['state'] =="PA") { echo "SELECTED";} ?&gt;&gt;Pennsylvania&lt;/option&gt;
    &lt;option value="RI" &lt;?php if($_POST['state'] =="RI") { echo "SELECTED";} ?&gt;&gt;Rhode Island&lt;/option&gt;
    &lt;option value="SC" &lt;?php if($_POST['state'] =="SC") { echo "SELECTED";} ?&gt;&gt;South Carolina&lt;/option&gt;
    &lt;option value="SD" &lt;?php if($_POST['state'] =="SD") { echo "SELECTED";} ?&gt;&gt;South Dakota&lt;/option&gt;
    &lt;option value="TN" &lt;?php if($_POST['state'] =="TN") { echo "SELECTED";} ?&gt;&gt;Tennessee&lt;/option&gt;
    &lt;option value="TX" &lt;?php if($_POST['state'] =="TX") { echo "SELECTED";} ?&gt;&gt;Texas&lt;/option&gt;
    &lt;option value="UT" &lt;?php if($_POST['state'] =="UT") { echo "SELECTED";} ?&gt;&gt;Utah&lt;/option&gt;
    &lt;option value="VT" &lt;?php if($_POST['state'] =="VT") { echo "SELECTED";} ?&gt;&gt;Vermont&lt;/option&gt;
    &lt;option value="VA" &lt;?php if($_POST['state'] =="VA") { echo "SELECTED";} ?&gt;&gt;Virginia&lt;/option&gt;
    &lt;option value="WA" &lt;?php if($_POST['state'] =="WA") { echo "SELECTED";} ?&gt;&gt;Washington&lt;/option&gt;
    &lt;option value="WV" &lt;?php if($_POST['state'] =="WV") { echo "SELECTED";} ?&gt;&gt;West Virginia&lt;/option&gt;
    &lt;option value="WI" &lt;?php if($_POST['state'] =="WI") { echo "SELECTED";} ?&gt;&gt;Wisconsin&lt;/option&gt;
    &lt;option value="WY" &lt;?php if($_POST['state'] =="WY") { echo "SELECTED";} ?&gt;&gt;Wyoming&lt;/option&gt;
&lt;/select&gt;
</code></pre>
