undefined variable _session
snippet in php

undefined variable _session

user1807

<?php
// add session start in your first main home page after login page
// example
// page1 : login.php 
session_start();
$_SESSION['name']='(your data modifiable)';
....
//redirect to your main page after login
// page2 : home-user.php
session_start();
// now you can use if(isset($_SESSION['name']){
?>