Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

453
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!