Here is my code:
<select name="country" class="sidelinks">
<?php
do
{
?>
<option value="<?php echo $row_AllCountries['country_ID']." ";?>"<?php if ($row_AllCountries['country_ID'] == $acountry) { echo "selected"; }?> >
<?php echo $row_AllCountries['countryname'];?></option>
<?php
}
while ($row_AllCountries = mysql_fetch_assoc($AllCountries));
?>
</select>
A few words to describe:
-$row_AllCountries['country_ID'](get from MySQL) is a unique country ID number
-$row_AllCountries['countryname'](get from MySQL) is the name of the country
-$acountry is the country ID number that i want to be selected when the form loads
I have a MySQL database where there are stored country names and their serial numbers(unique for each country).
I have a page with a form and there is a List Box(menu) with this countries in it.
When the page starts I want a specific country to be selected and that country ID to be equal to $acountries.
Anyone knows where's the problem and how to solve it???
Thanks and best regards
Rok



)