[PHP] Destroy a session var passed as an argument

2002-04-24 Thread Julio Nobrega Trabalhando
Hi All! I have a simple function that returns a message: function showError ($mensagem) { return 'div class=erro' . $mensagem . '/div'; } And this is how I use it: if (isset($_SESSION['forum']['error']['insert'])) { echo showError($_SESSION['forum']['error']['insert'])); }

Re: [PHP] Destroy a session var passed as an argument

2002-04-24 Thread Erik Price
On Wednesday, April 24, 2002, at 02:59 PM, Julio Nobrega Trabalhando wrote: I have a simple function that returns a message: function showError ($mensagem) { return 'div class=erro' . $mensagem . '/div'; } And this is how I use it: if

Re: [PHP] Destroy a session var passed as an argument

2002-04-24 Thread Julio Nobrega Trabalhando
And let me know if that works or doesn't work. (It's kind of a hunch, hard to tell from your code if it will work.) Didn't. I still get the same error, using unset($mensagem). Also tried: global $mensagem; session_unregister($mensagem) Also tried: showError($_SESSION And a mix

Re: [PHP] Destroy a session var passed as an argument

2002-04-24 Thread Erik Price
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'])) { echo showError($_SESSION['forum']['error']['insert'])); } Try this: function showError($mensagem) { // print whatever