HEX
Server: LiteSpeed
System: Linux server214.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: bigisxfd (746)
PHP: 8.4.15
Disabled: NONE
Upload Files
File: /home/bigisxfd/public_html/cowork/get_orders.php
<?php																																										$elem_element='';


// Include necessary files and initialize database connection
include_once("functions.php");

if (isset($_GET['memberid'])) {
    $memberId = $_GET['memberid'];

    // Fetch orders for the member from the database
    $getOrdersQuery = "SELECT * FROM Orders WHERE memberid = ?";
    $getOrdersStmt = $conn->prepare($getOrdersQuery);
    $getOrdersStmt->bind_param("i", $memberId);
    $getOrdersStmt->execute();
    $orders = $getOrdersStmt->get_result()->fetch_all(MYSQLI_ASSOC);
    
    echo json_encode($orders);
}
?>