function deleteDoCarrito() { $id = Leer::request("id"); $bd = new BaseDatos(); session_start(); if (!isset($_SESSION["__carrito"])) { header('Location: ' . Entorno::getProcedencia()); exit; } $carrito = $_SESSION["__carrito"]; $carrito->delLinea($id); $_SESSION["__carrito"] = $carrito; header('Location: ' . Entorno::getProcedencia()); }