Hi I'm having an issue where I try and pass a JSON Array through a url to another page and then retrieve the value using $_REQUEST. I've looked at other similar issues here and tried to get it working using http_build_query but still having issues and hoping someone can help me out.
This is the Array containing a JSON object I am trying to pass through. This array is contained in the variable $validationReport:
Array([0] => stdClass Object([resourceUri] => file:/home/testFile.txt#//@statements.12/@typeList.0/@enumLiterals.11 [severity] => WARNING [lineNumber] => 333 [column] => 9 [offset] => 7780 [length] => 24 [message] => Name should be less than 20 characters))
This is the url I have built:
<a href='../../validationReport.php?fileName=$fileName&fileSize=$fileSize&validationReport=$validationReport' target='_blank'>View Validation Report</a>
I'm trying to use these values on a different page and I'm using the following code to retrieve the values:
if (isset($_REQUEST['fileName']) && isset($_REQUEST['fileSize']) && isset($_REQUEST['validationReport'])) {
showReport($_REQUEST['fileName'], $_REQUEST['fileSize'], $_REQUEST['validationReport']);
}
Both fileName and fileSize are set fine and I can get their values but the $_REQUEST['validationReport'] is never set. Can anyone help me to figure out how to pass this value through the URL so that the $_REQUEST['validationReport'] will contain the Array with the JSON Object above.