Page 1 of 1

$_SERVER['QUERY_STRING'] returns blank

Posted: Tue Mar 10, 2009 2:46 pm
by PHPForever
ok guys, this is a problem thats been bothering us for a while.

Basically, we have a domain called http://www.testparentgiving.com and shop.parentgiving.com

Now, if I do a http://www.testparentgiving.com/index.p ... goryID=169, things work well and I see the ctegory page.

However if I do a shop.parentgiving.com/index.php?categoryID=169, it shows up the default index page again and not the category page.

Note: Both the sites are identical.

The difference i do see though when I try to print the $_SERVER['QUERY_STRING'] on the index.php under http://www.testparentgiving.com domain, it shows up categoryID=169

however this is blank under the shop.parentgiving.com domain .

Thoughts Anyone ?

Appreciate the help.

Re: $_SERVER['QUERY_STRING'] returns blank

Posted: Fri Mar 13, 2009 9:00 pm
by Benjamin
Why aren't you using the $_GET variable? You can rebuild the query string yourself:

Code: Select all

 
# php 5 only
$queryString = http_build_query($_GET);