Re: "GET" method can not get variables
| From: | Nick Gianakas | Date: | Tue, 04 Mar 2003 15:31:25 +0000 |
| Subject: | Re: "GET" method can not get variables | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-10278@lists.php.net to get a copy of this message | ||
Read the section titled, "HTTP functions" in the documentation.
Regards,
Nick
On Tue, 2003-03-04 at 08:42, E.E. Jan wrote:
> Could anybody give me a pointer for my problem?
> I just installed php 4.3.1 on my w2k platform
> I also installed Apache 2.0.43.
> I can get "hello world" and "phpinfo()" working.
> However, when I try a simple form like this following:
>
>
> <html>
> <title> test </title>
> <body>
> <form action="foo.php" method="get">
> Name: <input type="text" name="username"><br>
> Email: <input type="text" name="email"><br>
> <input type="submit" name="submit" value="Submit me!">
> <input type="reset" name="reset" value="reset!">
> </form>
> </body>
> </html>
>
>
> and my foo.php is
> <?php
> print ("hello, username = $username");
> ?>
> I got : hello, username =
> The $username is alwasy empty.....
> I know my form and GET action is working. I saw the following query string
> in url after I hit submit button:
>
> http://localhost/myphp/foo.php?username=qwe&email=123@us&submit=Submit+me%21
> However, php is not able to get varialbe $username and $email
>
> Any ideas?
>
> I tried the same script is ipower website, it works...
> Do I miss any thing in php.ini?
> I also switch to apache 1.37, I got the same results. The variable is still
> empty.
>
> Thanks
> E.E.
>
>
>