Ver Mensaje Individual
  #10 (permalink)  
Antiguo 11/04/2007, 16:16
Avatar de lilith_sr
lilith_sr
 
Fecha de Ingreso: enero-2007
Ubicación: México
Mensajes: 113
Antigüedad: 17 años, 3 meses
Puntos: 2
Re: como colocar en una caja de texto el resultado de una consulta?

hola de nuevo!!!.. .....aki les pongo todo el codigo de donde se porcesan las consultas....
Código PHP:

<?php
$lista
=array("gerencia"=>"gerencia","subarea"=>"subarea",);

$direccion=$_GET["select"]; 
$loQueSelecciona=$_GET["opcion"];

    
$tabla=$lista[$direccion];
    include (
"../coneccion.php");
$query=mysql_query("SELECT idgeografica, nombre FROM $tabla WHERE relaciongeografica='$loQueSelecciona'");
$query2=mysql_query("SELECT ubicacion FROM $tabla WHERE relaciongeografica='$oQueSelecciona");
echo 
"<select name='".$direccion."' id='".$direccion."' onChange='llenar(this.id)'>";
echo 
"<option value='0'>seleccionarr</option>";
    while(
$x=mysql_fetch_row($query))
    {    
    echo 
"<option value='".$x[0]."'>".$x[1]."</option>";
        
    }            
    echo 
"</select>";
    while(
$x2=mysql_fetch_row($query2))
            {

//*****************************************************//
/************** COMO LE HAGO PARA QUE EN ESTA PARTE SOLO ME***/
/
/**IMPRIMA LA UBICACION DE LA OPCION SELECCIONADA DEL ***/
/**SEGUNDO <SELECT>......ES QUE ASI COMO LO TENGO ME IMPRIME TODAS*/ 
/***LAS UBICACIONES DE TODO EL LISTADO DEL SEGUNDO <SELECT>****/
/
      echo 
$x2[0];
    
    }
    
}
?>