<?php


 include('concha.php');
mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");

$sql = "SELECT * FROM programacion WHERE dia = '$dia' ORDER BY ini";

$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{
$ID = $row["ID"];
$ini = $row["ini"];
$fin = $row["fin"];
$programa = $row["programa"];

$sql2 = "SELECT * FROM programas WHERE ID = '$programa'";

$consulta2 = mysql_query ($sql2);
while ($row2 = mysql_fetch_array($consulta2))
{
$nombre = $row2["nombre"];

}
mysql_free_result($consulta2);
?>

<style type="text/css">
<!--
.Estilo1 {
	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
}
-->
</style>
 
<span class="Estilo1">de <?php echo $ini ?> a <?php echo $fin ?><br>
<?php echo $nombre ?><br>
--------------</span><br>


<?	


}
mysql_free_result($consulta);


?>
