RE: [PHP-ES] Botones, texto y submit
| From: | Gustavo Castro | Date: | Fri, 02 Apr 2004 03:38:00 +0000 |
| Subject: | RE: [PHP-ES] Botones, texto y submit | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-47379@lists.php.net to get a copy of this message | ||
Bueno di estas en un formulario solo podes referirte a una pagina de
action=nnnnn.php pero hay una forma que es programar esa pagina nnnnnn.php
para que reaccione como necesitas según si lo llamaste con clic en un boton
o en otro (creo que esto te puede servir), para saber que boton fue utiliza
isset() si existe o no la variable (que es del mismo nombre del boton) es
el boton que hiciste clic.
Espero haber sido claro cualquier cosa te mando el if armado con el isset()
suerte.
Gustavo
-----Original Message-----
From: Rafael Morales [mailto:rmorales@segob.gob.mx]
Sent: Miércoles, 31 de Marzo de 2004 09:00 p.m.
To: php-es@lists.php.net
Subject: [PHP-ES] Botones, texto y submit
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Buenas !!!!!!
Tengo una duda HTMLera, perdonen el OT pero es que no he encontrado
informacion sobre esta bronquita que tengo.
Tengo 2 botones (los cuales quiero que cada uno mande a diferentes paginas
respectivamente), pero ademas tengo una barra de texto y un submit. Lo que
quiero es seleccionar un boton poner una fecha en la caja de texto y el
submit tome ambos valores. Les envio mi codigo.
Saludos.
<BODY>
<FORM ACTION=Pagina2.php METHOD="post" ALIGN=center >
<p> </p>
<p> </p>
<p align="center">UN TEXTO CUALQUIERA</p>
<p align="center"> </p>
<blockquote>
<p align="left">Tipo </p>
<p align="left">
<input type=radio name=radiobutton value="busqueda1.php" checked>
Opcion 1</p>
<p align="left">
<input type=radio name=radiobutton value="busqueda2.php">
Opcion 2</p>
</blockquote><br>
<? ACA VA CODIGO DE PHP PARA LA FECHA. ?>
<td><INPUT TYPE=TEXT NAME=Dia_inicio VALUE=<?print "$yesterday";?> SIZE=2
MAXSIZE=2>
/<td><INPUT TYPE=TEXT NAME=Mes_inicio VALUE=<?print "$yes_month";?>
SIZE=2
MAXSIZE=2>
/<td><INPUT TYPE=TEXT NAME=Anio_inicio VALUE=<?print "$yes_year";?>
SIZE=4
MAXSIZE=4>
</table><br><br>
<table border=1>
<th align=center colspan=4>Fecha Fin
<tr>
<td align=center>D\355a
<td align=center>Mes
<td align=center>A\361o
<tr>
<td><INPUT TYPE=TEXT NAME=Dia_fin VALUE=<?print "$yesterday";?> SIZE=2
MAXSIZE=2>
/<td><INPUT TYPE=TEXT NAME=Mes_fin VALUE=<?print "$yes_month";?> SIZE=2
MAXSIZE=2>
/<td><INPUT TYPE=TEXT NAME=Anio_fin VALUE=<?print "$yes_year";?> SIZE=4
MAXSIZE=4>
</table><br><br>
<p align="left"> </p>
<p align="center">
<input type="submit" name="Submit"
value="CONSULTAR"><br><br>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (OpenBSD)
iD8DBQFAa1t2AkjcqRy6owwRAgXAAKClcxBHwjMSfZWpJfYCGdEzSd8pggCguX+n
5OsM3ZC6j1BMyEFyni2qQ7o=
=yoD8
-----END PGP SIGNATURE-----
--
PHP Spanish Localization Talk Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php