Hi,
I'm trying to call a php function with a session variable from a beforedisplay event on an Add record page:
global $strTableName, $conn;
setpricesetid($_SESSION[$strTableName."_masterkey1"]);
Trouble is I don't get any value in the session variable.
I inserted the following lines between the global declaration and the function call to write a footprint to a "results" table and it confirmed the session variable was blank or null.
$strSQLInsert = "insert into results (ResultName, ResultValue) values ('Session var=','".$_SESSION[$strTableName."_masterkey1"]."')";
db_exec($strSQLInsert,$conn);
Before inserting the function call the Add page was indeed adding the record correctly linked to its master table.
what am I doing wrong here? Is that session variable not set up at the time of the beforedisplay event?
Giles