Search
 
SCRIPT & CODE EXAMPLE
 

PHP

end session variable php

// destroy the session
<?php
session_destroy();
?>
Comment

php end session

<?php
// Initialize the session.
// If you are using session_name("something"), don't forget it now!
session_start();

// Unset all of the session variables.
$_SESSION = array();

// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("session.use_cookies")) {
    $params = session_get_cookie_params();
    setcookie(session_name(), '', time() - 42000,
        $params["path"], $params["domain"],
        $params["secure"], $params["httponly"]
    );
}

// Finally, destroy the session.
session_destroy();
?>
Comment

PREVIOUS NEXT
Code Example
Php :: php get only numbers 
Php :: remove duplicate values in array php 
Php :: php get url path name 
Php :: how to create controler in laravel 
Php :: install php 7.3 on amazon linux 2 
Php :: php delete array item by value not key 
Php :: install phpmyadmin ubuntu 
Php :: get http referer php 
Php :: set charset of response php 
Php :: what php can do 
Php :: where not in laravel 
Php :: php console output 
Php :: php artisan serve specify ip 
Php :: create laravel project old version 
Php :: show php erros 
Php :: read key value json php 
Php :: remove every whitespace php 
Php :: wordpress post date 
Php :: phpMyAdmin is not able to cache templates 
Php :: create new laravel project with specific version 
Php :: php copyright footer 
Php :: laravel debugbar false not working 
Php :: only alphabets and space is allowed validation laravel 
Php :: how to get length of object in php 
Php :: python truncate file contents 
Php :: phpspreadsheet setcellvalue row background color 
Php :: yii2 advanced nginx 
Php :: wordpress echo the page title 
Php :: Date and Time PHP Continued 
Php :: php remove slash from string 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =