Sorry to post this a second time, for some reason it went on saying it was resolved.
Okay, so I can't get rid of my sessions. It WON'T log out. I tried stuff I knew about, it didn't work. Then I grabbed some stuff from online, it still doesn't work. Here is my current patched up log-out code.
function logout_user($logouturl)
{
// Initialize the session.
// If you are using session_name("something"), don't forget it now!
session_start();
// Unset all of the session variables.
$_SESSION = array();
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-42000, '/');
}
// Finally, destroy the session.
session_destroy();
unset($_COOKIE[session_name()]);
global $userdata;
unset($userdata);
header('Location: $logouturl');
}