Syntax : bool session_destroy (void)
This method will destroy all the data related to the current session. Note that this will not unset any global variables or session cookies that are associated with the session.
<?php
//Session set
session_start();
$prog="PHP";
$name="Code2care";
$_SESSION['prog'] = $prog;
$_SESSION['name'] = $name;
//Destory session
session_destroy();
?>
Note: To kill the session completely, the session id must also be unset.
More Posts related to PHP,
- PHP drag and drop file upload tutorial using dropzone.js
- Copy file from one directory to other in Php
- PHP Base64 encoding decoding a variable
- macOS - cannot calculate MAC address: Using fd 9 hv_vm_create HV_ERROR [PHP XAMPP]
- Upload Pdf file using PHP Script
- Call PHP function on Button click using jquery ajax
- PHP Code for sending Emails
- PHP header location function not called
- Delete file using PHP code : unlink()
- PHP Warning: Cannot modify header information - headers already sent
- Failed to load resource: net::ERR_CACHE_MISS PHP
- Upload docx file using PHP script
- PHP 301 Redirect Permanently
- PHP Script to Upload Images to Server
- Installing vue.js in Laravel 8
- Remove URL Forward Slash Before Single or Double quotes in php.ini
- How to destroy PHP session()
- PHP Fatal error : Call to a member function bind_param() on a non-object
- 403 forbidden error for Image
More Posts:
- Update Created By (Author) column of SharePoint document using PowerShell - SharePoint
- How to change SharePoint Online site collection or subsite URL address - SharePoint
- How to Import External Jars to Android Studio Project - Android-Studio
- Java JDBC Get Id of the Inserted Record with AutoIncrement - Java
- Fix - sudo: systemctl: command not found - Ubuntu
- How to Show Battery Percentage inside iPhone 12-14 Battery Indicator? - iOS
- [Fix] Office 365 Sharepoint One Drive Error: Something went wrong. This is a temporary issue - SharePoint
- How to find the path of formula Installation by Brew - HowTos