Re: How to pass on a variable with a page request
| From: | Bruno Tersago | Date: | Wed, 22 Nov 2000 10:31:58 +0000 |
| Subject: | Re: How to pass on a variable with a page request | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-26604@lists.php.net to get a copy of this message | ||
Yes, track_vars is indeed turned on in my php config.
The code of my test.php is:
<html>
<head>
<title>test</title>
</head>
<body bgcolor="#ffffff">
<p>
<?php
print "<br>GET:".$HTTP_GET_VARS ("user");
print "<br>POST:".$HTTP_POST_VARS ("user");
print "<br>INTERNAL:".$user;
?>
</body>
</html>
And in my browser, I enter the address
http://euclides.fhw.gr/test.php?user=Bruno
I read through the manual, but I can't figure out what is wrong, because the
php configuration seems to be OK.
-- Bruno
----- Original Message -----
From: <Lawrence.Sheed@dfait-maeci.gc.ca>
To: <bruno@fhw.gr>
Cc: <php-general@lists.php.net>
Sent: Τετάρτη, 22 Νοεμβρίου 2000 12:17 μμ
Subject: RE: [PHP] How to pass on a variable with a page request
> I forgot to ask
>
> Is track_vars turned on in your php config?
>
> Its always on in php4.03, but not on unless specified on in earlier
> versions.
>
> Also, can you post your test.php please?
>
> I think your code is bad, not your php ;)
>
> Some things you should read about variable precedence:
>
> http://www.php.net/manual/html/language.variables.external.html
>
>
> Also have a look at
> http://www.php.net/manual/html/configuration.html
>
> Cheers,
>
> Lawrence.
>
> -----Original Message-----
> From: Bruno Tersago [mailto:bruno@fhw.gr]
> Sent: November 22, 2000 06:14 PM
> To: Lawrence.Sheed@dfait-maeci.gc.ca
> Cc: PHP General
> Subject: Re: [PHP] How to pass on a variable with a page request
>
>
> Hi Lawrence,
>
> I think I located the problem now thanks to your suggestions.
>
> > I would first try passing the url to a test file eg
> >
> > test.php
> > <?
> > print "<br>GET:".$HTTP_GET_VARS ("user");
> > print "<br>POST:".$HTTP_POST_VARS ("user");
> > print "<br>INTERNAL:".$user;
> > ?>
> >
>
> I did what you suggested and the answer I got from PHP was:
> Call to undefined function: array() in /usr/local/httpd/htdocs/test.php on
> line 9
>
> This means that PHP does not recognize the function $HTTP_GET_VARS
> I don't know why this happens, but I suppose this is the reason why the
> variables don't appear in my pages.
> Funny, because register_globals is On in my php.ini
>
> Any thoughts?
>
> -- Bruno
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net