select initial empty value

awolowo

New Member
helloi have a dropdown which is working of sorts, however instead selecting the empyt selected value 'select an address' it always shows the last entry in the dropdown instead of the empty selected value. i intially had help with code from another source but seem to have lost my way with it. where am i going wrong? many thanksPS. sorry about the layout, but this is how it was layed out after pressing the code button.\[code\] > $address_result = mysql_query("SELECT > * FROM company_com ORDER BY address1_com ASC"); $dropdown = > "<select name='address'>"; $dropdown > .= "<option SELECTED value=http://stackoverflow.com/"\">Select > an Address</option>";while($row = mysql_fetch_assoc($address_result)) { $address = $row["address1_com"].$row["address2_com"].$row["address3_com"]; $dropdown .= "<option SELECTED value='".$row['address']."'>$address</option>";}$dropdown .= "</select>";\[/code\]
 
Back
Top