Foros del Web » Programando para Internet » PHP »

select paises ciudades....combobox

Estas en el tema de select paises ciudades....combobox en el foro de PHP en Foros del Web. QUE TAL AMIGOS....KISIERA SABER COMO IMPLEMENTAR LO SIGUIENTE... UNA VEZ KE SELECCIONES EL PAIS....(YA FUNCIONA) ME APARESCA EN EL SIGUIENTE COMBOBOX LAS CIUDADES DE ESE ...
  #1 (permalink)  
Antiguo 12/02/2011, 23:09
 
Fecha de Ingreso: noviembre-2010
Mensajes: 208
Antigüedad: 13 años, 5 meses
Puntos: 3
select paises ciudades....combobox

QUE TAL AMIGOS....KISIERA SABER COMO IMPLEMENTAR LO SIGUIENTE...

UNA VEZ KE SELECCIONES EL PAIS....(YA FUNCIONA)
ME APARESCA EN EL SIGUIENTE COMBOBOX LAS CIUDADES DE ESE PAIS...

AKA DEJO EL COD.


<?php
include("conectar.php");
?>


<fieldset><legend align="center"> Datos Cliente Nuevo </legend>

<form action="registrar_cli.php" method="POST">
<table width="572" border="0" >

<tr>
<td>Nombre </td>
<td><input name="apellidop" size="25" /></td>
<td></td>
</tr>
<tr>
<td>Fono </td>
<td><input name="apellidom" size="25" /></td>
<td></td>
</tr>
<tr>
<td>PAIS</td><td><select name="ciudad">


<?php

//seleccionamos de la BD todos los nombres de las ciudades desde la tabla city
$sql_city=("SELECT PAI_NOMBRE FROM PAI_PAIS WHERE 1 ");
$query=mysql_query($sql_city)
or die ("Error al consultar por conductor:".mysql_error());
echo "<option value ='' >Seleccionar ciudad</option>";
while($datos=mysql_fetch_array($query))
{
echo " <option name=\"$datos[PAI_NOMBRE]\">
$datos[PAI_NOMBRE]</option>";
}

?> </select> </td> <td></td>
</tr>
<tr>




</label> <br />


<tr>
<td/><span class="Estilo5">(<span class="Estilo1">*<span class="Estilo3">) campos obligatorios </span></span></span>
<td><input type="submit" value="Registrar "/>
<label>
<input type="reset" name="reset" value="Borrar" />
</label></td>
</tr>
</table>

</form>
</fieldset>
  #2 (permalink)  
Antiguo 13/02/2011, 11:19
Avatar de carlos_belisario
Colaborador
 
Fecha de Ingreso: abril-2010
Ubicación: Venezuela Maracay Aragua
Mensajes: 3.156
Antigüedad: 14 años
Puntos: 461
Respuesta: select paises ciudades....combobox

busca el termino select dependientes con ajax en google encontraras bastante información de esto, saludos
__________________
aprende d tus errores e incrementa tu conocimientos
it's not a bug, it's an undocumented feature By @David
php the right way

Etiquetas: select
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:17.