echo "<select name=type size=1>\n";
do{
if ($record==1){
echo "<option value=".$data['cname']." selected>".$data['cname']."</option>\n";
}
else{
echo "<option value=".$data['cname'].">".$data'cname']."</option>\n";
}
}while($data=@mysql_fetch_array($result));
echo "</select>\n";
?>