database_query($sql2) or $em=$em.$database->database_error(); $wh_below_ad = $database->database_result($result2,0); $_SESSION["whab"]=json_encode($wh_below_ad); } else { $wh_below_ad=$_SESSION["whab"]; } $arr = array ('error'=>$em, 'whadbelow'=>$wh_below_ad); echo json_encode($arr); ?>