File "fetch_data_for_bio.php"
Full path: /home/julaysp1/public_html/order/list/fetch_data_for_bio.php
File
size: 589 B (589 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 typeOforder ='text'";
$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");
}
?>