Hi,
I'm trying to filter my form based on drop down menu form which is on the same page as the grid, and posts its value back to the page itself. It doesn't work:
session_start();
if (!empty($_POST["iOffice"])){
$_SESSION["iOffice"]= $_POST["iOffice"];
$iOffice = $_SESSION["iOffice"];
} else {
$iOffice = "";
}
SQL:
"WHERE trns.office = '$iOffice'";
Much thanks,
ali
1 Answers
Try this
session_start();
if (!empty($_POST["iOffice"])){
$_SESSION["iOffice"]= $_POST["iOffice"];
} else {
// check if ajax call of grid
$is_ajax = isset($_REQUEST["nd"]) || isset($_REQUEST["oper"]) || isset($_REQUEST["export"]);
if ($is_ajax)
$iOffice = $_SESSION["iOffice"];
else
$iOffice = "";
}
Your Answer