Forum Moderators: coopster
$print_type = "flyer";function check_print_type($type){
if($type == $print_type){
$var = "selected = \"selected\"";
return $var;
} else {
$var = "";
return $var;
}
}<select size="1" name="print_type">
<option></option>
<option value="banner" <?php echo check_print_type("banner"); ?>>banner</option>
<option value="flyer" <?php echo check_print_type("flyer"); ?>>flyer</option>
</select>