$cochesCreados++; } if (!isset($_SESSION['bicicleta'])) { $_SESSION['bicicleta'] = serialize(new Bicicleta("MontanBike", "Gensis")); $cochesCreados++; } if (!isset($_SESSION['kmTotal'])) { $_SESSION['kmTotal'] = 0; } if (!isset($_SESSION['VehiculosCreados'])) { $_SESSION['VehiculosCreados'] = $cochesCreados; } $cocheDeLuis = unserialize($_SESSION['coche']); $biciPaco = unserialize($_SESSION['bicicleta']); Vehiculo::setkilometrajeTotal($_SESSION['kmTotal']); Vehiculo::setVehiculosCreados($_SESSION['VehiculosCreados']); ?> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <?php /* $cocheJose = new Coche("Saab", "93"); $biciPepe = new Bicicleta("MontanBike", "Gensis"); $cocheJose->KmRecorridos(20); $biciPepe->KmRecorridos(20); */ if ($_POST['accion'] == "kmCocheInicia") { $km = $_POST['kmCoche'];