![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
08/10/2007, 10:13
|
![Avatar de ferbux](http://static.forosdelweb.com/customavatars/avatar180221_1.gif) | | | Fecha de Ingreso: mayo-2007 Ubicación: por ahí intentado ayudar
Mensajes: 823
Antigüedad: 17 años, 9 meses Puntos: 6 | |
Re: List Box de PHP Hola, puedes hacerlo de la siguiente forma:
<table width="407" border="0" align="left">
<tr>
<td bgcolor="#FFFFFF">ALGUNTITULO*</td>
<td>
<?
include ("conexion.h");
$r="select tu consulta";
echo "<select name=nombre de tu lista>";
echo "<option></option>";
while ($con= mysql_fetch_array($r)) {
echo "<option value = ".$con[0];
if ($con[0]==a algo de tu consulta])
echo " selected ";
echo " >";
echo $con[1];
echo "</option>";
}
echo "</select>";
?>
</td>
</tr>
</table>
Ojala me hayas comprendido.
SALU2
__________________ "Eres grande por que caminas entre gigantes" |