How come PHP removes the dollar sign from a query_string?
So when the URL has .com/test.php?tID=10, the query_string becomes .com/test.phptID=10
$page = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}{$_SERVER['QUERY_STRING']}";
Thanks!
How come PHP removes the dollar sign from a query_string?
So when the URL has .com/test.php?tID=10, the query_string becomes .com/test.phptID=10
$page = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}{$_SERVER['QUERY_STRING']}";
Thanks!
The question mark marks the beginning of the query string, but is not part of the query string.
Ok, so I can tweak the $page variable to accommodate that. However, in reality, the full URL I’m testing includes multiple variables, not just tID. The query_string function is only showing the first variable from my URL. Why does it truncate everything after the first variable?
Thanks!
Normally it doesn’t. I can only suspect that something in your code is causing the truncation.