When you use sessions in your application, you need to call it from EVERY page that you make use of '$_SESSION' data. The 'session_start' statement must be at the top of your page before you add any other code. To check if a session were started, you can use the following check -
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
You can read more on sessions at
PHP - session_start[
^]