Kevin,
first, change your URL statement to: http://......./test.php?test=1 // the $
is not needed.
second, use $test=$_GET['test'] to get the transferred value into $test.
then, echo $test and see if it works.
Hugh
----- Original Message -----
From: "Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 10:04 AM
Subject: [PHP] really simple problem with GET


> Hi,
>
> I am sorry if the level of this question is too simple but I can't figure
> out what's wrong.  I want to pass a variable value through the URL using
the
> Get method.
>
> FOr example http://......./test.php?$test=0
>
> and my test.php code are as follow:
>
> <html>
> <body>
> <?php
>
> if (!empty($_SERVER))
>   extract($_SERVER);
>
> if (!empty($_GET)) {
> extract($_GET);
> } else if (!empty($HTTP_GET_VARS)) {
> extract($HTTP_GET_VARS);
> }
>
> if (!empty($_POST)) {
> extract($_POST);
> } else if (!empty($HTTP_POST_VARS)) {
> extract($HTTP_POST_VARS);
> }
>
> echo "hello $test";
> ?>
>
>
> </body>
> </html>
>
>
> BUt my outcome is
>
> hello
>
> so therefore my $test variable isn't passing through, does anybody know
what
> I did wrong?
>
> Thanks
>
> Kelvin
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to