Posted by Ric Manalac on 06/04/05 09:54
Hello,
I've encountered a weird problem with using $_GET. I've recently moved
to a new hosting company and an old code suddenly stopped working
correctly.
From my index page, I pass a value through the querystring to another
PHP script. The querystring parameter goes like ?catid=500.
In the script that attempts to get the value, I have the following code:
if (isset($_GET["catid"]))
{
$catid = $_GET["catid"];
}
else
{
$catid = 1;
}
What used to happen was $catid is assigned the value of $_GET["catid"]
if the catid parameter is passed through the querystring. But what
happens now is $catid is always set to 1 because $_GET["catid"] seems
to be always blank now. I've already tried removing the "isset()
check" and went directly assigning the value as such:
$catid = $_GET["catid"];
.... but it still returned a blank value. What's happening to my
$_GET values?
I hope someone can help. Is this something that can be
fixed by changing some configuration on the server? Is there something
that I need to change with my code?
Thanks!
Ric
Navigation:
[Reply to this message]
|