One Hat Cyber Team
Your IP :
216.73.216.186
Server IP :
88.222.243.1
Server :
Linux in-mum-web1837.main-hosting.eu 5.14.0-503.34.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 27 06:00:50 EDT 2025 x86_64
Server Software :
LiteSpeed
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
u322583024
/
domains
/
awaha.in
/
public_html
/
View File Name :
remove-cart-item.php
<?php session_name('vaishnavi_awaha'); session_start(); header('Content-Type: application/json'); include 'admin/connection.inc.php'; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $data = json_decode(file_get_contents('php://input'), true); if (!isset($data['product_id'])) { echo json_encode(['success' => false, 'message' => 'Product ID missing']); exit; } $product_id = intval($data['product_id']); // Delete query $stmt = $conn->prepare("DELETE FROM cart WHERE product_id = ?"); $stmt->bind_param("i", $product_id); if ($stmt->execute()) { echo json_encode(['success' => true]); } else { echo json_encode(['success' => false, 'message' => 'Failed to remove item']); } $stmt->close(); $conn->close(); } else { echo json_encode(['success' => false, 'message' => 'Invalid request']); } ?>