hi guys i added dropdown field to form however after i submit the form if there is any error dropdown resets itself how can keep to value after validation thanks a lot for your any helps and idea here is my code
<td><select id="country" name="country" style="width:150px;">
<option value="-1">Select</option>
<?php
$query = "SELECT country_id, name FROM countries ";
$result = mysql_query($query);
while($row = mysql_fetch_array($result))
{
echo "<option value="".$row[ country_id ]."" >".$row[ name ]."</option>
";
}
?>
</select></td>
<td><?php echo $form->error("country"); ?></td>