Re: shouldn't $_SERVER['PHP_SELF'] include the get info?
| From: | Erwin | Date: | Thu, 26 Sep 2002 10:02:49 +0000 |
| Subject: | Re: shouldn't $_SERVER['PHP_SELF'] include the get info? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117685@lists.php.net to get a copy of this message | ||
Noodle Snacks wrote:
> I was using a redirect using $_SERVER['PHP_SELF'] from the previous
> page (a login for a site) and it didn't include this from the url:
?aid=12.
>
> shouldn't it? It caused a SQL error. (which I have included a catch
> for so the error will be friendly)
>
> instead of the variable to be: /co2_busters_mk2/full_article.php I
> want it to be: /co2_busters_mk2/full_article.php?aid=12. (like it
> would appear in the address bar).
>
> is it sposed to be like that or is it a bug? Also what is the best
> way to include all get data in the url?
It is supposed to be like that...the PHP_SELF points to this file, and the
filename has no arguments, thus the PHP_SELF variable don't have them
either.
You will have to use the $_GET array for the "aid=12" part.
Grtz Erwin