I have carried out some tests.
in test.html:
<a href="request.php?parName=1234">link</a>
in request.php:
$foo = $_REQUEST['parName'];
echo $foo ;
I have also tried:
$foo = $_GET['parName'];
echo $foo ;
Both of which work.
Therefore thinking about the strange issue you are encountering, you will need carry out various checks:
- Is the query string getting passed? See $_SERVER["QUERY_STRING"]
- Check the request method $_SERVER["REQUEST_METHOD"]
-
Check to see if the parName variable isset
if(isset($_GET['parName'] )) {
$foo = $_GET['parName'];
echo $foo ;
}
else { "echo query string not received";
}
- Check your error log to see what Apache is saying?
-
What data is actually contained in the parName variable?
var_dump($_REQUEST['parName'])
Once you've run all these tests, and the issue is still not resolved, please post your results so we can consider other possible paths to solving this problem.