I am using the following code to display the search parameters on the report.
global $strTableName;
if (isset($_SESSION[$strTableName.'_advsearch']))
{
$searchClauseObj = unserialize($_SESSION[$strTableName.'_advsearch']);
}
$fieldSearchData = $searchClauseObj->_where[$strTableName."_srchFields"];
echo "Search was completed."."
";
for($i=0; $i<count($fieldSearchData); $i++){
$fName = $fieldSearchData[$i]['fName'];
$val1 = $fieldSearchData[$i]['value1'];
$val2 = $fieldSearchData[$i]['value2'];
$srchCat = $fieldSearchData[$i]['opt'];
$srchNot = $fieldSearchData[$i]['not'];
echo "Search Field: ".$fName."
";
echo "Search Option: ".$val1."
";
}
If I echo $_SESSION[$strTableName.'_advsearch'] to the page I get a lot of information about the search. Here is a part:
C:12:"SearchClause":4279:{a:27:{s:6:"_where";a:9:{s:22:"simpleSrchTypeComboOpt";s:8:"Contains";s:22:"simpleSrchTypeComboNot";b:0;s:24:"simpleSrchFieldsComboOpt";s:0:"";s:11:"_simpleSrch";s:0:"";s:24:"_srchCriteriaCombineType";s:3:"and";s:11:"_srchFields";a:1:{i:0;a:6:{s:5:"fName";s:2:"ID";s:5:"eType";s:0:"";s:6:"value1";s:3:"112";s:3:"not";b:0;s:3:"opt";s:8:"Contains";s:6:"value2";s:0:"";}}s:18:"_srchOptShowStatus";b:0;s:20:"_ctrlTypeComboStatus";b:0;s:17:"srchWinShowStatus";b:0;}s:5:"tName";s:10:"properties";s:15:"searchFieldsArr";a:42:{i:0;s:2:"ID";i:1;s:13:"Municipality1";i:2;s:9:"District1";i:3;s:13:"Sub_District1";i:4;s:11:"Plantation1";i:5;s:2:"SG";i:6;s:4:"Code";i:7;s:7:"Farm_ID";i:8;s:7:"Poly_ID";i:9;s:5:"Owner";i:10;s:4:"Deed";i:11;s:24:"
However, I am not getting any unserialized data back.
I have tried this on both an online server, and on localhost.