<?
	$stateId = (isset($stateId))? $stateId : "";
	//change the below line;
	$StateInputIdName = (isset($StateInputIdName))? $StateInputIdName : 'stateId';
?>
<select name="<?=$StateInputIdName;?>" id="<?=$StateInputIdName;?>" class="reginput">
<option value="">Select State</option>
	<option value="AN" <? if($stateId == "AN"){ ?> selected="selected"<? }?>>Andaman &amp; Nicobar</option>
	<option value="AP" <? if($stateId == "AP"){ ?> selected="selected"<? }?>>Andhra Pradesh</option>
	<option value="AR" <? if($stateId == "AR"){ ?> selected="selected"<? }?>>Arunachal Pradesh</option>
	<option value="AS" <? if($stateId == "AS"){ ?> selected="selected"<? }?>>Assam</option>
	<option value="BH" <? if($stateId == "BH"){ ?> selected="selected"<? }?>>Bihar</option>
	<option value="CH" <? if($stateId == "CH"){ ?> selected="selected"<? }?>>Chattishgarh</option>
	<option value="DD" <? if($stateId == "DD"){ ?> selected="selected"<? }?>>Daman &amp; Diu</option>
	<option value="DL" <? if($stateId == "DL"){ ?> selected="selected"<? }?>>Delhi</option>
	<option value="GA" <? if($stateId == "GA"){ ?> selected="selected"<? }?>>Goa</option>
	<option value="GJ" <? if($stateId == "GJ"){ ?> selected="selected"<? }?>>Gujarat</option>
	<option value="HP" <? if($stateId == "HP"){ ?> selected="selected"<? }?>>Himanchal Pradesh</option>
	<option value="HR" <? if($stateId == "HR"){ ?> selected="selected"<? }?>>Haryana</option>
	<option value="JH" <? if($stateId == "JH"){ ?> selected="selected"<? }?>>Jharkhand</option>
	<option value="JK" <? if($stateId == "JK"){ ?> selected="selected"<? }?>>Jammu &amp; Kashmir</option>
	<option value="KA" <? if($stateId == "KA"){ ?> selected="selected"<? }?>>Karnataka</option>
	<option value="KR" <? if($stateId == "KR"){ ?> selected="selected"<? }?>>Kerala</option>
	<option value="LK" <? if($stateId == "LK"){ ?> selected="selected"<? }?>>Lakhshadweep</option>
	<option value="MH" <? if($stateId == "MH"){ ?> selected="selected"<? }?>>Maharashtra</option>
	<option value="MJ" <? if($stateId == "MJ"){ ?> selected="selected"<? }?>>Mizoram</option>
	<option value="ML" <? if($stateId == "ML"){ ?> selected="selected"<? }?>>Meghalaya</option>
	<option value="MN" <? if($stateId == "MN"){ ?> selected="selected"<? }?>>Manipur</option>
	<option value="MP" <? if($stateId == "MP"){ ?> selected="selected"<? }?>>Madhya Pradesh</option>
	<option value="NL" <? if($stateId == "NL"){ ?> selected="selected"<? }?>>Nagaland</option>
	<option value="OR" <? if($stateId == "OR"){ ?> selected="selected"<? }?>>Orissa</option>
	<option value="PJ" <? if($stateId == "PJ"){ ?> selected="selected"<? }?>>Punjab</option>
	<option value="PO" <? if($stateId == "PO"){ ?> selected="selected"<? }?>>Pondichery</option>
	<option value="RJ" <? if($stateId == "RJ"){ ?> selected="selected"<? }?>>Rajasthan</option>
	<option value="SK" <? if($stateId == "SK"){ ?> selected="selected"<? }?>>Sikkim</option>
	<option value="TN" <? if($stateId == "TN"){ ?> selected="selected"<? }?>>Tamil Nadu</option>
	<option value="TR" <? if($stateId == "TR"){ ?> selected="selected"<? }?>>Tripura</option>
	<option value="UP" <? if($stateId == "UP"){ ?> selected="selected"<? }?>>Uttar Pradesh</option>
	<option value="UT" <? if($stateId == "UT"){ ?> selected="selected"<? }?>>Uttaranchal</option>
	<option value="WB" <? if($stateId == "WB"){ ?> selected="selected"<? }?>>West Bengal</option>
</select>