prepare("UPDATE road_challans SET status = 0 WHERE id = ?"); $stmt->bind_param("i", $id); $stmt->execute(); // Output HTML with JS alert and redirect echo ""; exit; }