<?php


 include('concha.php');


$sql = "SELECT * FROM programacion WHERE dia = '$dia' ORDER BY ini";
$cual = 0;
$consulta = $conn->query($sql);
while ($row = $consulta->fetch_assoc())
{
$ID = $row["ID"];
$ini = $row["ini"];
$fin = $row["fin"];
$programa = $row["programa"];
$cual = $cual + 1;


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

$consulta2 = $conn->query($sql2);
while ($row2 = $consulta2->fetch_assoc())
{
$nombre = $row2["nombre"];
$imagen = $row2["imagen"];

}
$consulta2->free_result();
?>


<div>
    <img class="img-fluid" loading="lazy" src="<? echo $dom."/upload_pic/resize_".$imagen.".jpg"?>" />
    <div class="p-1">
        <h4><?php echo $nombre ?></h4>
        <p><b><?php echo $ini ?>hs a <?php echo $fin ?>hs</b></p>
    </div>
</div>


<?	


}



?>
