Re: If... Else.. I'm not getting it!
| From: | Frank Keessen | Date: | Sat, 25 Jan 2003 11:46:25 +0000 |
| Subject: | Re: If... Else.. I'm not getting it! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133097@lists.php.net to get a copy of this message | ||
Wow!! It worked... Sorry for the confusion about the get!!
Thanks guys, i can go further!!! Have a nice weekend!
Regards,
Frank
----- Original Message -----
From: "Rich Gray" <rich@f1central.net>
To: "Frank Keessen" <fkeessen@planet.nl>; <php-general@lists.php.net>
Sent: Saturday, January 25, 2003 12:42 PM
Subject: RE: [PHP] If... Else.. I'm not getting it!
> You are using the post method not get so $_GET[] should be empty.
>
> Does this version of your code work?
>
> <?php
> if(isset($_POST['submit'])) {
> $vname=$_POST['vname'];
> echo "hello $vname";
> } else {
> ?>
> <form action="<? echo ($_SERVER['PHP_SELF']); ?>" method=post>
> <table>
> <tr><td>Input yourname</td><td><input type=text
> name=vname></td></tr>
> <tr><td colspan=2><input type=submit name=submit></td></tr>
> </table>
> </form>
> <?php
> }
> ?>
>
> Rich
> -----Original Message-----
> From: Frank Keessen [mailto:fkeessen@planet.nl]
> Sent: 25 January 2003 11:33
> To: Johannes Schlueter; php-general@lists.php.net
> Subject: Re: [PHP] If... Else.. I'm not getting it!
>
>
> Hi,
>
> Thanks, but i'm a kind of a newbie in PHP and what i've read it's better
to
> have the register_globals = Off!!! If you look at my code you see that i'm
> using the $_GET variable.. This works fine!! It's the IF.. ELSE what gives
> me a lot of trouble!
>
> Frank
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>