PHP Session issues

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
monkeyfoot
Forum Newbie
Posts: 6
Joined: Thu Nov 30, 2006 2:54 pm

PHP Session issues

Post by monkeyfoot »

Hi everyone! Long time lurker, first time poster. I'm having a problem with some session variables.

Adding info into the session works just fine. So does modifying that information. I can't seem to delete or clear out the values of the variables. Below are some of the methods I'm trying to use. None of them seem to be working.

Code: Select all

if(isset($_SESSION['userErrors']))
{
$_SESSION['userErrors'] = null;
session_unregister('userErrors');
unset($GLOBALS['userErrors']);
unset($GLOBALS['_SESSION']['userErrors']);
unset($userErrors);
}
I'm running PHP 5.1.6 on WinXP. Any help would be greatly appreciated!

-Mike
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

how about:

Code: Select all

<?php
unset($_SESSION['userErrors']);
?>
monkeyfoot
Forum Newbie
Posts: 6
Joined: Thu Nov 30, 2006 2:54 pm

Post by monkeyfoot »

Alas, that does seem to be working either. :(
Post Reply