Im testing my code on a domain where register_globals were on. Never would have thought of checking that.
Thanks once again, now I can go to sleep...
Leif K-Brooks wrote:
If you have register_globals on, you'll need to session_unregister it.
Gerard Samuel wrote:
Got a problem thats baffling me.
I have a form that includes a file that starts a session.
Creating sessions are no problem, but deleting the session variable is not working as its supposed to.
Sudo code ->
<?php
include('some_file.php'); // This file starts the session via session_start();
switch( $bar )
{
case 'post':
// do logic and insert into db
unset($_SESSION['foo']); // we are finished with session variable, so delete it
break;
case 'preview': // preview form contents and set session to persist $_SESSION['foo'] = 'some data'; break;
default: if (isset($_SESSION['foo'])) { unset($_SESSION['foo']); }
// display form here break; }
?>
For some reason thats beyond me, using unset() to kill the session variable isn't working.
Does anyone know what could be causing this type of behaviour??
Any help would be appreciated.
Thanks
-- Gerard Samuel http://www.trini0.org:81/ http://test1.trini0.org:81/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php