![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
03/07/2007, 13:57
|
| | Fecha de Ingreso: diciembre-2006 Ubicación: Miami
Mensajes: 55
Antigüedad: 18 años, 1 mes Puntos: 0 | |
Re: Resultado depende de variable este es el código del drop down
<select name="select">
<option value="select" <?php if (!(strcmp("select", $row_Service_List['Service Name']))) {echo "selected=\"selected\"";} ?>>Select a Service</option>
<?php
do {
?>
<option value="<?php echo $row_Service_List['Service Name']?>"<?php if (!(strcmp($row_Service_List['Service Name'], $row_Service_List['Service Name']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Service_List['Service Name']?></option>
<?php
} while ($row_Service_List = mysql_fetch_assoc($Service_List));
$rows = mysql_num_rows($Service_List);
if($rows > 0) {
mysql_data_seek($Service_List, 0);
$row_Service_List = mysql_fetch_assoc($Service_List);
}
?>
</select> |