
18/12/2008, 11:10
|
| | Fecha de Ingreso: octubre-2008
Mensajes: 25
Antigüedad: 16 años, 4 meses Puntos: 0 | |
Respuesta: Necesito ayuda con combo.
Código:
<body>
<form id="form1" name="form1" method="post" action="">
<br />
<br />
<input value="<?php echo $row_rs2['idanimal']; ?>" type="text" name="textfield" />
</label>
<label>animales
<select name="select" onchange="submit()" ><option>opcion</option>
<?php
do {
?>
<option value="<?php echo $row_rs['nombre']?>"<?php if (!(strcmp($row_rs['nombre'], $row_rs2['nombre']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rs['nombre']?></option>
<?php
} while ($row_rs = mysql_fetch_assoc($rs));
$rows = mysql_num_rows($rs);
if($rows > 0) {
mysql_data_seek($rs, 0);
$row_rs = mysql_fetch_assoc($rs);
}
?>
</select>
</label>
</form>
</body>
|