Exemplo n.º 1
0
    $socio = $_POST["txtSocio"];
    $edad = $_POST["txtEdad"];
    $idSocioInsertado = $video->insertaSocio($socio, $edad, $idVideoclub, 0, "", "");
    $_SESSION["idSocio"] = $idSocioInsertado;
    header("location: alquiler.php");
}
if ($_POST["btnSeleccionar"] == "Seleccionar") {
    $_SESSION["idSocio"] = $_POST["selSocio"];
    header("location: alquiler.php");
}
if ($_POST["CrearVideoclub"] == "CrearVideoclub") {
    $txtNuevoGerente = $_POST["txtNuevoGerente"];
    $txtNuevoaCiudad = $_POST["txtNuevoaCiudad"];
    $txtNuevaDireccion = $_POST["txtNuevaDireccion"];
    $txtNuevoCP = $_POST["txtNuevoCP"];
    $video->insertaVideoclub($txtNuevoGerente, $txtNuevoaCiudad, $txtNuevaDireccion, $txtNuevoCP);
    ?>
		<script type="text/javascript">
			alert("Videoclub insertado");
		</script>
		<?php 
}
include "header.php";
?>
	<form method="post" action="">
		<?php 
if ($idSocioInsertado > 0) {
    ?>
				<script type="text/javascript">
				alert("Se ha creado un socio con id: <?php 
    echo $idSocioInsertado;