Ver Mensaje Individual
  #3 (permalink)  
Antiguo 04/09/2006, 10:00
brandu
 
Fecha de Ingreso: agosto-2006
Mensajes: 10
Antigüedad: 17 años, 8 meses
Puntos: 0
Donde iria el selected

este es el codigo.

<form name="form1" id="form1">
<div align="center">
<select name="menu1" onchange="MM_jumpMenu('parent',this,0)">


<?php
//Generamos el menu desplegable
while ($row=mysql_fetch_array($result))
{
echo '<option value="PRUEBA2.php?num='.$row["id_producto"].'"';
echo (isset($_GET['num']) && $row["id_producto"] == $_GET['num'])?' selected':'';
echo '>'.$row["nombre"].'</option>';

}

?>
</select>
<?php
if(isset($_GET['num'])){
$sSQL="Select * From producto where id_producto = '".$_GET['num']."'";
$result=mysql_query($sSQL);
$row=mysql_fetch_array($result);
}?>
</div>

</form>
<form method="post" action="actualizarproducto.php?id=<? echo $HTTP_GET_VARS['num'] ?>" name="cambios" enctype="multipart/form-data">
<table width="87%" height="620" border="0" align="center">

<tr>
<th scope="col"><div align="right">Nombre del producto : </div></th>
<th scope="col">&nbsp;</th>
<th height="41" scope="col"><div align="left">
<input type="text" name="nombre" size="49" value="<? echo $row['nombre'] ?>"/>
</div></th>
</tr>
<tr>
<th scope="col"><div align="right">Fabricante :</div></th>
<th scope="col">&nbsp;</th>
<th height="39" scope="col"><div align="left">
<input type="text" name="fabricante" size="40" value="<? echo $row['fabricante'] ?>"/>
</div></th>
</tr>
<tr>
<th scope="col"><div align="right">Modelo : </div></th>
<th scope="col">&nbsp;</th>
<th height="39" scope="col"><div align="left">
<input type="text" name="modelo" size="40" value="<? echo $row['modelo'] ?>"/>
</div></th>
</tr>
<tr>
<th scope="col"><div align="right">Caracteristicas : </div></th>
<th scope="col">&nbsp;</th>
<th height="39" scope="col"><div align="left">
<textarea name="caracteristicas" cols="45"><? echo $row['caracteristicas'] ?></textarea>
</div></th>
</tr>
<tr>
<th scope="col"><div align="right">Acabados : </div></th>
<th scope="col">&nbsp;</th>
<th height="40" scope="col"><div align="left">
<input type="text" name="acabados" size="40" value="<? echo $row['acabados'] ?>"/>
</div></th>