This topic is locked
[SOLVED]

 Unset Session Values

12/29/2013 3:15:41 PM
PHPRunner General questions
S
SkyForum author

Ok, quick question. I am using the following to pass a value to a second add page. (watch out, I'm getting dangerous now!)
$_SESSION["violations_mastertable"] = "tagsession";

$_SESSION["violations_masterkey1"] = $keys["id"] = $values['Property'];
Works fine. Now, once I am done using that second add page, I want to remove or delete the values in the sessions. Can I do it like this using another button to escape the form?
unset ($keys["id"]);

unset ($values['Property']);
???

S
SkyForum author 12/29/2013



Ok, quick question. I am using the following to pass a value to a second add page. (watch out, I'm getting dangerous now!)
$_SESSION["violations_mastertable"] = "tagsession";

$_SESSION["violations_masterkey1"] = $keys["id"] = $values['Property'];
Works fine. Now, once I am done using that second add page, I want to remove or delete the values in the sessions. Can I do it like this using another button to escape the form?
unset ($keys["id"]);

unset ($values['Property']);
???



I tried it. Does not work.

Admin 12/30/2013

Unset session variables themselves:

unset($_SESSION["violations_mastertable"]);
S
SkyForum author 12/30/2013



Unset session variables themselves:

unset($_SESSION["violations_mastertable"]);



AHA! Knew it had to be simple.