
23/06/2006, 13:49
|
 | | | Fecha de Ingreso: junio-2006
Mensajes: 14
Antigüedad: 18 años, 7 meses Puntos: 0 | |
Este es el codigo echo "<FORM NAME='Id_Usuario' ACTION='vale.php' METHOD='POST'>\n";
$bds = $result;
$Num_bds = mysql_num_rows($bds);
echo "<SELECT NAME='Id_Usuario'
onChange = 'document.datos.stab.selectedIndex = 0;
document.datos.sfield.selectedIndex = 0;
document.datos.submit()'>";
echo "\n";
// Se forman todas las opciones del select
for ($i = 0; $i < $Num_bds; $i++)
{
$Id_Usuario[$i] = mysql_tablename($bds, $i);
echo "<OPTION VALUE='$i'";
// Si el índice es $sbd es que era el seleccionado
if ($i == $sbd)
echo " SELECTED";
echo ">".$Id_Usuario[$i]."</OPTION>\n";
echo "\n";
}
echo "</SELECT></TD>\n";
?>
es decir me ingresa la i, en lugar del dato que ocupa ese espacio. |