PHP: Call to undefined function session_unregister()

session_unregister() is DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0. Look here. Replace session_unregister('variable'); with unset($_SESSION['variable']);