selection box problem

Questionsselection box problem
Ali asked 11 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 11 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

17 + 9 =

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?