Ejemplo n.º 1
0
<?php

if (!isset($_SESSION)) {
    session_start();
}
if (isset($_SESSION['id_imprimere'])) {
    if (isset($_POST['cliente']) && isset($_POST['descripcion'])) {
        require_once '/../../php/clases/ventas.class.php';
        $class_venta = new venta();
        $class_venta->insertar($_SESSION['id_imprimere'], $_POST['cliente'], $_POST['descripcion']);
    }
} else {
    session_destroy();
    header("Location: ../../index.php");
}