Re: Re: Pasar mas de un valor con LIST BOX

From: Date: Wed, 18 Jan 2006 20:24:29 +0000
Subject: Re: Re: Pasar mas de un valor con LIST BOX
References: 1 2 3 4  Groups: php.general.es 
Request: Send a blank email to general-es+get-57402@lists.php.net to get a copy of this message
oks espero esto t sirva... adjunto el codigo del ejemplo.. //pagina1.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script language="javascript"> function seleccion(seleccion){ document.formulario.index.value=seleccion; } </script> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form name="formulario" method="post" action="pagina2.php"> <blockquote> <p name="select"> <select name="mycombo" onChange="javascript:seleccion(this.selectedIndex)"> <option value="N" selected>Seleccione</option> <option value="<?=serialize(array(1,2,3,4,5))?>">array 1</option> <option value="<?=serialize(array(6,7,8,9,10))?>">array 2</option> </select> </p> </blockquote> <input type="hidden" name="index"> <input type="submit" name="Submit" value="Submit"> </form> </body> </html> //pagina2.php <?php echo "aca pintamos el array q viene del form<br>"; print_r(unserialize($_REQUEST["mycombo"])); echo "<br>aca pintamos el item q selecciono del combo ...".$_REQUEST["index"]; ?> listo .. esto deberia ayudarte saludos Fernando Lima-Peru

« previous php.general.es (#57402) next »