Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

457
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda