<?php
// session_start() tiene que estar al principio del todo, sino te dara error.
@ error_reporting ( 0 );
ini_set ( 'display_errors' , '0' );
session_start(); // aqui no.
$_SESSION['fecha']=$_REQUEST['fecha'];
$_SESSION['hora']=$_REQUEST['hora'];
?>
<?php // sobra hacer esto, puede estar todo junto.
$fecha=$_POST['anioevento'].'/'.$_POST['mesevento'].'/'.$_POST['diaevento']; // falta el form de esto en el codigo.
$hora=$_POST['hora'];
$conexion=mysql_connect("localhost","","") or
die("Problemas en la conexion");
mysql_select_db("evento",$conexion) or
die("Problemas en la seleccion de la base de datos");
$busqueda= mysql_query("SELECT fecha FROM reserva WHERE fecha='$fecha'and hora='$hora'");
if(mysql_fetch_array($busqueda)>0) {
echo "la fecha y hora escogida no esta disponible. Por favor intente con otra.
";
echo "<a href=\"javascript:history.back()\">Regresar</a>";
}
if ($usuario){ // donde defines la variable $usuario?
echo " <script>window.open('for_cliente.php','','height=400,width=400');
</script>";
exit;}
else {
// este else no sirve para nada si no tiene contenido.
}
?>
<html>
<head>
<title>Problema</title>
</head>
<body>
la fecha que uste desea esta libre .
<a href="for_cliente.php">aqui para poner sus datos personales
las variables de sesión</a>
</body>
</html>
<?php
session_start(); // aqui te dara error, debe de estar solo al principio.
?>
<?php
$nombre=$_POST["nombre"]; // falta el form de esto.
$apellidos=$_POST["apellidos"];
$telefono=$_POST["telefono"];
$email=$_POST["email"];
$tipoevento=$_POST["tipoevento"];
$conexion=mysql_connect("localhost","","") or
die("Problemas en la conexion");
mysql_select_db("evento",$conexion) or
die("Problemas en la seleccion de la base de datos");
mysql_query("insert into reserva(fecha,nombre,apellidos,telefono,email,tipoevento) values ('$fechaevento','$nombre','$apellidos','$telefono','$email','$tipoevento')",
$conexion) or die("Problemas en el select".mysql_error());
mysql_close($conexion);
echo "";
?>
<html>
<head>
<title>Problema</title>
</head>
<body>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
</p>
<table width="311" border="1" align="center" bordercolor="#999999" bgcolor="#999999">
<tr>
<td width="106">fecha
<?php
$fecha=$_SESSION['fecha'];
echo "<td align='center'><input type='text' value='".$fecha."'>";
echo "</tr>";
echo "<tr>";
?></td><td width="195"><label>hora
<?php
$hora=$_SESSION['hora'];
echo "<td align='center'><input type='text' value='".$hora."'>";
?>
los errores te los dejo en comentarios del codigo.