How to clear session in PHP Simple way

 You can clear _SESSION 


<?php

        session_start(); 

          session_destroy();

        $_SESSION = [];

echo '<h1>You have been successfully remove session</h1>';

?>

No comments:

Post a Comment

Understanding Array Swapping in JavaScript Step-by-Step Guide

  1. Basic Swap (Using Temporary Variable) Concept : Use a temporary variable to hold one value during the swap. javascript // Step 1: Initi...

Best for you