Re: Sentence if...then
| From: | Díaz | Date: | Thu, 30 Jan 2003 20:06:09 +0000 |
| Subject: | Re: Sentence if...then | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-31860@lists.php.net to get a copy of this message | ||
if (pres=1)
{
echo "Haz algo";
}
----- Original Message -----
From: "Ezequiel Sapoznik" <ezequiel2002@2vias.com.ar>
To: <lista@phpes.com>
Sent: Thursday, January 30, 2003 6:04 AM
Subject: [PHP-ES] Sentence if...then
> Les hago una pregunta simple (soy bastante nuevo en esto).
>
> Como es la sintaxis para una sentencia if donde quiero que evalue si lo
que
> muestra la pantalla es una opción determinada de una lista?
>
> <?php
> echo('<form method="POST" action=' . $_SERVER['PHP_SELF'] .
> '>');
> echo('<p align="right"><select size="1"
> name="pres">');
> echo('<option value=1>Opción 1</option>');
> echo('<option value=2>Opción 2</option>');
> echo('</select>);
> echo('<input type="submit" value="Enviar"
> name="B1"></p>');
> echo('</form>');
>
> ACA QUIERO DECIR QUE SI LA OPCION SELECCIONADA ES LA 1 ENTONCES QUE HAGA
> ALGO.
>
> Gracias por la ayuda,
>
> Ezequiel
>
>
> ---------------------------------------------------------------------
> 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
>