what is the correct syntax (if is possible) to pass a variable to a function with on_insert or on_update?
I tried this for example:
$e[“on_insert”] = array(“my_insert_function($_SESSION[myvalue])”, null, true);
function my_insert_function(&$data, $myvalue)
$data[“params”][“log_myvalue”] = $myvalue;
But I only get a 500 Internal server error
The event callbacks default receives required data as param.
If you want to use $_SESSION in function, you can always use it as it is super global.
$data[“params”][“log_myvalue”] = $_SESSION[“myval”];
Abu Ghufran - Dev Team
PHP Grid Framework
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?