1<?php
2// add session start in your first main home page after login page
3// example
4// page1 : login.php
5session_start();
6$_SESSION['name']='(your data modifiable)';
7....
8//redirect to your main page after login
9// page2 : home-user.php
10session_start();
11// now you can use if(isset($_SESSION['name']){
12?>