Search
 
SCRIPT & CODE EXAMPLE
 

PHP

como destruir uma variavel de sessão

// criando sessões de login
session_start();
$email = $_SESSION['email'];
$senha = $_SESSION['senha'];

// criando sessões do jogo
$senha = $_SESSION['palavra'];
$senha = $_SESSION['letra'];

// removendo todas as sessões
session_start();
session_destroy();
unset( $_SESSION );

// removendo sessões do jogo
// opção 1)
unset( $_SESSION['palavra'] );
unset( $_SESSION['senha'] );

// opção 2)
$_SESSION['palavra'] = null;
$_SESSION['senha'] = null;
Comment

PREVIOUS NEXT
Code Example
Php :: php remove element from array by value 
Php :: laravel file store 
Php :: @lang laravel blade 
Php :: compact example in php 
Php :: run laravel cron job on cpanel 
Php :: artisan in route in laravel 
Php :: wordpress post autosave time 
Php :: set only allow post request to a page - php 
Php :: file put contents php 
Php :: return view inside subfolder laravel 
Php :: how to make core controller codeigniter 3 more than 1 
Php :: laravel all fillable 
Php :: windows logged in user name in php 
Php :: get specific word from string php 
Php :: softDelete laravel8 
Php :: how to redirect to another page in php after submit 
Php :: laravel phpdoc collection of model 
Php :: rest api response 404 wordpress 
Php :: how to check path laravel 
Php :: Change date format on view - laravel 
Php :: php pdo setting error modes 
Php :: php prepared statement upload file 
Php :: php header not working 
Php :: how run all seeder at once in laravel 
Php :: assigning variable in php 
Php :: strrev php 
Php :: wordpress limit post content length 
Php :: mail() function in php not working 
Php :: naming the routes in laravel 
Php :: random string number generator in php codeigniter 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =