Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/03/2013, 02:05
Avatar de guardarmicorreo
guardarmicorreo
 
Fecha de Ingreso: noviembre-2012
Ubicación: Córdoba
Mensajes: 1.153
Antigüedad: 11 años, 5 meses
Puntos: 84
Pregunta no devuelve los datos después de consulta

tengo este código

Código PHP:
Ver original
  1. $tipo_habi=$_POST['habitaciones'];
  2.                
  3. $consulta="SELECT * FROM usuarios, habitaciones where (usuario='".$_SESSION['usuario']."' and usuarios.id_habitaciones = habitaciones.id and ".$tipo_habi." = ".$tipo_habi.")";
  4. $result_conexion=Conectar($consulta);
  5. echo "hola"; //hasta aquí se ejecuta
  6. while($fila=mysql_fetch_array($result_conexion))
  7. {
  8.    
  9.     echo $fila[$tipo_habi]; //no imprime en pantalla la consulta
  10. }

y no me devuelve el echo que hay en el while, no entiendo por qué si alguien me puede ayudar. puedo proporcionar todo el código que necesiten. gracias!!