How to clear Insert session ID on page reload
Hi Ray
I have an insert sb that redirects to another page to add some additional info automatically for the user. This uses the session ID variable created by the insert sb as part of the URL string, as follows:
... "&id_act=" . $_SESSION['id_act'] ...
This works correctly.
However, when I go back to the first form page and add another record with the insert sb, the URL string picks up the earlier session ID variable, not the latest.
I tried this unset($GLOBALS['id_act']) code at the start of the insert sb, but it does not seem to work:
if (isset($_POST["WA_Insert1"]) || isset($_POST["WA_Insert1_x"])) {
// Clear any earlier id_act SESSION value
unset($GLOBALS['id_act']);
$InsertQuery = new WA_MySQLi_Query($crm_realpress_wa);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "cu_action_act";
$InsertQuery->bindColumn("idlic_act", "i", "".((isset($_POST["idlic_act"]))?$_POST["idlic_act"]:"") ."", "WA_DEFAULT");
etc...
How should I clear the earlier session ID variable reliably?
Thanks
Michael