Código PHP:
       session_start();
    
    
    if(!empty($_SESSION["id"])) {
        $id = $_SESSION["id"];
        $_SESSION["id"] = "";
    }
    
    if(!empty($_SESSION["status"])) {
        $status = $_SESSION["status"];
        $_SESSION["status"] = "";
    }
    
    if(!empty($id) && !empty($status)) {
    
        switch($status){
            case "ALTA":
                mostrar("Se ha agregado:",$id);
                break;
            
            case "UPDATE":
                mostrar("Actualizado:",$id);
                break;
            default: echo "";
        }
    }
    else {
        header("Location: index.php");
    } 
     
 




