<?
2 // you need the values of your combobox in an array
3 $values = array('us','de','uk','fr','xx');
4 echo '
5 <form method="post" action="'.$_SERVER['PHP_SELF'].'">
6 <select name="country">';
7 for($x = 0; $x < count($values); $x++)
8 {
9 // write "selected" if the value matches the one posted
10 if($values[$x] == $_POST['country'])
11 {
12 $selected = ' selected';
13 }else{
14 $selected = '';
15 }
16 // print the option
17 echo '
18 <option value="'.$values[$x].'"'.$selected.'>'.$values[$x].'</option>';
19 }
20 echo '
21 </select>
22 <input type="submit" value="check it out">
23 </form>';
24 ?>