Answers for "PHP Notice: Undefined variable: _SESSION"

PHP
2

undefined variable _session

<?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']){
?>
Posted by: Guest on November-04-2020
1

laravel ErrorException Undefined variable: _SESSION

$selected_deal = $req->session()->get('selected_deal'); 
$selected_deal = session('selected_deal');
Posted by: Guest on July-20-2021

Code answers related to "PHP Notice: Undefined variable: _SESSION"

Browse Popular Code Answers by Language