HI, I am not able to access the session variable $user_name = $_SESSION['USER_NAME']; when accessing inside a included page. I have included one page using include() function. the session variable is not available inside that. the following is the code i used for registering session: session_start(); session_register('USER_NAME'); $_SESSION['USER_NAME'] = $user_name;
Are you including the include page after the session start if so then there should be no problem at all.
if you use session_register don't use $_SESSION to register your variable again. use one or another, but not both!! better is to use $_SESSION['var'] = $value;