This topic is locked

$_GET not available

4/4/2008 9:45:05 AM
PHPRunner General questions
coolbyte author

I am going to use the $_GET-Varaiable in the BeforeQuery-Event in the Chart-View like this:
$abofrom=$_GET['from'];

$aboto=$_GET['to'];
if($abofrom!="")

$strWhereClause=whereAdd($strWhereClause,"abostart >='$abofrom' and abostart <='$aboto'");
Unfortunately it seems not to be available there. How can I pass the $_GET-Values to there.

J
Jane 4/7/2008

Hi,
to pass values to the chart SQL query save it in the $_SESSION variables in the Before process event and then use these $_SESSION variables in the Before SQL query event.

$_SESSION["abofrom"]=$_GET['from'];

$_SESSION["aboto"]=$_GET['to'];


if($_SESSION["abofrom"]!="")

$strWhereClause=whereAdd($strWhereClause,"abostart >='".$_SESSION["abofrom"]."' and abostart <='".$_SESSION["aboto"]."'");