░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
lon105.truehost.cloud
LOCATION:
/home/ilrtztmy/woodcoffiefurnitureworks.com/api/quotes
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: delete.php
<!-- THINK The user wants to delete quotes. I need to create a PHP file that handles the DELETE request for quotes. This file will connect to the database, instantiate the Quote model, set the quote ID from the request, and then call the delete method on the Quote object. Finally, it will return a JSON response indicating success or failure. --> <?php header("Access-Control-Allow-Origin: *"); header("Content-Type: application/json; charset=UTF-8"); header("Access-Control-Allow-Methods: POST"); header("Access-Control-Max-Age: 3600"); header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"); include_once __DIR__ . '/../config/db.php'; include_once __DIR__ . '/../models/Quote.php'; $database = new Database(); $db = $database->getConnection(); $quote = new Quote($db); $data = json_decode(file_get_contents("php://input")); $quote->id = isset($_GET['id']) ? $_GET['id'] : die(); if($quote->delete()){ http_response_code(200); echo json_encode(array("message" => "Quote was deleted.")); } else { http_response_code(503); echo json_encode(array("message" => "Unable to delete quote.")); } ?>
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