$options = array('' => 'Alle Landen', 'Germany' => $_LANG['C_GERMANY'], 'Andorra' => $_LANG['C_ANDORRA'], 'England' => $_LANG['C_ENGLAND'], 'Austria' => $_LANG['C_AUSTRIA'], 'Belgium' => $_LANG['C_BELGIUM'], 'Scotland' => $_LANG['C_SCOTLAND'], 'Spain' => $_LANG['C_SPAIN'], 'France' => $_LANG['C_FRANCE'], 'Greece' => $_LANG['C_GREECE'], 'Canary' => $_LANG['C_CANARY'], 'Ireland' => $_LANG['C_IRELAND'], 'NorthIreland' => $_LANG['C_NIRELAND'], 'Italy' => $_LANG['C_ITALY'], 'Madeira' => $_LANG['C_MADEIRA'], 'Malta' => $_LANG['C_MALTA'], 'Netherlands' => $_LANG['C_NETHERLANDS'], 'Wales' => $_LANG['C_WALES'], 'Portugal' => $_LANG['C_PORTUGAL'], 'Switzerland' => $_LANG['C_SWITZERLAND'], 'Bulgaria' => $_LANG['C_BULGARIA'], 'Croatia' => $_LANG['C_CROATIA'], 'Czech' => $_LANG['C_CZECH']);?>
<select name="search_country" class="style1">
foreach ( $options as $key => $value)
$selected = '';
if(isset($_GET['search_country']) && $_GET['search_country'] == $key)
$selected = ' selected ';
echo '<option value="' . $key . '" ' . $selected .'>' . $value . '</option>';
So basically, if somone selects Netherlands it should display the provinces of the netherlands from a preset [hardcoded] list. Everything I tried so far results in either no list at all, code errors or a full list with every province of every country. Can I add an ‘if’ statement somehow that checks value in box one and based on that display anything that matches the if statement? If so, any pointers in where to start (besides the manual)?
What is the best way to achieve the above (and please remember I’m a beginner).
thanks once again!