Re: Valor de campo entrada text

From: Date: Fri, 19 Jul 2002 15:36:40 +0000
Subject: Re: Valor de campo entrada text
References: 1 2 3  Groups: php.general.es 
Request: Send a blank email to general-es+get-25083@lists.php.net to get a copy of this message
Esto en lo que dice el manual: Zero or more choices may be pre-selected for the user. User agents should determine which choices are pre-selected as follows: If no OPTION element has the selected attribute set, no options should be pre-selected. If one OPTION element has the selected attribute set, it should be pre-selected. If the SELECT element has the multiple attribute set and more than one OPTION element has the selected attribute set, they should all be pre-selected. It is considered an error if more than one OPTION element has the selected attribute set and the SELECT element does not have the multiple attribute set. User agents may vary in how they handle this error, but should not pre-select more than one choice. <select size="1" name="Programa" value="<?php echo $myrow["programa"] ?>"> <option value="00" selected>*</option> <option value="01">PCN</option> <option value="02">PEE</option> <option value="03" >UNUA</option> </select> El atributo selected se usa dentro de las option, no se como cambiarlo en forma dinamica en funcion del valor que tenga $myrow["programa"]? ----- Original Message ----- From: "Andres Ferrando" <anferr@mecon.gov.ar> To: <lista@phpes.com> Sent: Friday, July 19, 2002 11:35 AM Subject: Re: [PHP-ES] Valor de campo entrada text mirá el atributo "selected". y, de paso, leé un manual de html! > seria una cosa asi > > value="<?php if (isset($myrow["anio"])) {echo $myrow["anio"]} > else {echo 2002} ?>" > > en el caso de un tipo select como se hace, porque poniendo el value como en > los text, no me da pelota? > > ----- Original Message ----- > From: "Andres Ferrando" <anferr@mecon.gov.ar> > To: <lista@phpes.com> > Sent: Friday, July 19, 2002 11:15 AM > Subject: Re: [PHP-ES] Valor de campo entrada text > > > > si tiene un valor $myrow["anio"] lo imprimis, y si no lo tiene, imprimis > > "2002" ... > > > > > la pregunta es como hago para que cuando estoy actualizando > > > value="<?php echo $myrow["anio"] ?>" > > > y cuando estoy en modo alta > > > value="2002" -- Andres Ferrando <anferr@mecon.gov.ar> --------------------------------------------------------------------- Archivo On-line: http://www.phpes.com/ via news: news://news.phpes.com/ Manual PHP en español: http://www.php.net/manual/es/ Para dar de baja la suscripción, mande un mensaje a: lista-unsubscribe@phpes.com

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