Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

459
Vistas
Update page without page reload

I have this php code with a sql query and I want the page(more like a part of the page) to update without page reload. I also have a button that when I click it updates the variable(?date=) on the link. What I want now is to also execute this block of code without page reload.

Here are pictures what I want to achieve:

[So when I click the date, it updates the ?date variable on the link][1]

[and I want this to also update based on the sql query I have without reloading the page][2]

<?php
if (isset($_GET["date"])) {
    foreach ($db->query("SELECT DayName, StartTime, EndTime FROM event_availability 
    INNER JOIN days ON days.DayID = event_availability.DayID 
    WHERE EventID = ? AND DayName = ?", $_GET["eventid"], date('l', strtotime($_GET["date"]))) as $availtime) {
?>
        <?php
        $i = 1;
        $start = date('h:i A', strtotime($availtime["StartTime"]));
        $end = $availtime["EndTime"];

        while (strtotime($start) <= strtotime($end)) {
        ?>
            <input type="radio" class="btn-check shadow-none" name="timeradio" id="btnradio<?php echo $i ?>" autocomplete="off">
            <label class="btn btn-outline-primary" for="btnradio<?php echo $i ?>"><?php echo $start ?></label>
        <?php
            $start = date("h:i A", strtotime("$start + 30 mins"));
            $i++;
        }
        ?>
<?php
    }
}
?>


  [1]: https://i.stack.imgur.com/lHxCq.png
  [2]: https://i.stack.imgur.com/aQP5k.png
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda