Re: Destroy a session var passed as an argument
| From: | Erik Price | Date: | Wed, 24 Apr 2002 19:30:23 +0000 |
| Subject: | Re: Destroy a session var passed as an argument | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94441@lists.php.net to get a copy of this message | ||
On Wednesday, April 24, 2002, at 02:59 PM, Julio Nobrega Trabalhando wrote:
And this is how I use it: if (isset($_SESSION['forum']['error']['insert'])) {Try this: function showError(&$mensagem) { // print whatever here unset($GLOBALS['mensagem']); } Try that without the pass-by-reference ('&') too, if it doens't work. According to http://www.php.net/manual/en/function.unset.php, you might not be able to do it without explicitly trying unset($_SESSION['forum']['error']['insert']); Good luck, Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.comecho showError($_SESSION['forum']['error']['insert']));}