$_SESSION only exists if you start the session
added method to check for duplicate course selections
removed debug code
removed debug code
updated comments