<?
require('../conectar.php');
require('../valtiempoinact.php');
$sql="SELECT * FROM llenacombos where campo='$campo' order by nom";
$rl=mysql_query($sql);
while ($ll = mysql_fetch_object ($rl)) 
{
?><option value="<? echo $ll->nom ?>"<?if($ll->nom == $valor){?>selected="selected"<?}?>><? echo $ll->nom ?>
<?
}
mysql_free_result($rl);
?>