MOON
Server: Apache
System: Linux server30c.hostingraja.org 5.14.0-611.49.2.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 30 09:05:08 EDT 2026 x86_64
User: seoprovi (1222)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /home/seoprovi/safelogisticsmovers.com1/royalyantra.com/result-chart-query.php
<?php
include 'DBController.php';
$db_handle = new DBController();
    
    if (! empty($_POST['day'] && $_POST['month'] && $_POST['year'])) {
        $date = $_POST['day'].'-'.$_POST['month'].'-'.$_POST['year'];
        $_POST['date'] = array(date("d-m-Y", strtotime($date))); 
        
        $query = "SELECT * from result";
        $i = 0;
        $selectedOptionCount = count($_POST['date']);
        $selectedOption = "";
        while ($i < $selectedOptionCount) {
            $selectedOption = $selectedOption . "'" . $_POST['date'][$i] . "'";
            if ($i < $selectedOptionCount - 1) {
                $selectedOption = $selectedOption . ", ";
            }
            
            $i ++;
        }
        $query = $query . " WHERE date in (" . $selectedOption . ") ORDER BY id ASC";
        
        $result = $db_handle->runQuery($query);
        echo json_encode($result);
        die;
    }
?>