Ver Mensaje Individual
  #5 (permalink)  
Antiguo 13/10/2010, 08:16
wilmer30
 
Fecha de Ingreso: enero-2010
Mensajes: 491
Antigüedad: 14 años, 4 meses
Puntos: 12
Respuesta: listar consulta debajo de formulario

que tal. vi tu codigo y encuentro algunos errores, por ejemplo:

Código PHP:
$mysql_enlace=mysql_connect($servidor,$usuario,$cl ave); 
hay una separciona en $cl_ave

$sql = "SELECT * FROM reserva WHERE fecha_inicio AND fecha_final BETWEEN fechainicio AND fechafinal";

Yo lo arreglaría así

Código PHP:
$sql "SELECT * FROM reserva WHERE ".$_POST['fechainicio']." AND ".$_POST['fechafinal']." BETWEEN fecha_inicio AND fecha_final"
OJO, cuando busques la fecha debe ser 'YYYY-MM-DD' y si es 'DD-MM-YYYY' no te encontrará nada.

En el While insertaría así:

Código PHP:
while($row mysql_fetch_array($result))
{
echo 
'<tr>';
echo 
'<td>'.$row['fecha_inicio'].'</td>';
echo 
'<td>'.$row['fecha_final'].'</td>';
echo 
'<td>'.$row['tiempo_inicio'].'</td>';
echo 
'<td>'.$row['tiempo_final'].'</td>';
echo 
'<td>'.$row['estado'].'</td>';
echo 
'<td>'.$row['observaciones'].'</td>';
echo 
'<td>'.$row['idusuarios'].'</td>';
echo 
'<td>'.$row['idespacios'].'</td>';
echo 
'</tr>';

espero te funcione.