File "fetch_data_for_bio.php"

Full path: /home/julaysp1/public_html/admin/order/list/fetch_data_for_bio.php
File size: 611 B (611 B bytes)
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Editor &nnbsp; Back

<?php
session_start();
if(isset($_SESSION["user_id"])){


// fetch_operators.php
include('../../includes/configuration.php'); 

// Fetch operators from the database
$query = "SELECT * FROM prices WHERE  work_status = 1 AND orderName IN ('robi_airtel', 'banglalink', 'grameenphone', 'teletalk') ";
$result = $conn->query($query);

$operators = [];
if ($result->num_rows > 0) {
    while ($row = $result->fetch_assoc()) {
        $operators[] = $row;
    }
}

// Return JSON response
header('Content-Type: application/json');
echo json_encode($operators);
  
  
}else{
header("location: ../../index.php");
}  
?>