selection box problem

Questionsselection box problem
Ali asked 6 years ago

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
Abu Ghufran answered 6 years ago

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

5 + 14 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!