Código PHP:
<?php
session_start();
if (isset($_SESSION["autentificado"])){
if ($_SESSION["autentificado"]=="no"){
header("Location: privado.php");
exit();
}
}
else
header("Location: privado.php");
if (!isset($_SESSION["vehiculo"])){
$vehiculo=new VoDAOClass();
$_SESSION["vehiculo"]= $vehiculo;
}
else $vehiculo=$_SESSION["vehiculo"];
?>