$user = $_SESSION['k_username']; $query = "INSERT INTO historial (usuario, fecha)VALUES ('$user', NOW())";