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.
- PHP Code for sending Emails
- PHP drag and drop file upload tutorial using dropzone.js
- Delete file using PHP code : unlink()
- Save current timestamp in MySQL using PHP mysqi binding
- Failed to load resource: net::ERR_CACHE_MISS PHP
- PHP Warning: Cannot modify header information - headers already sent
- PHP header location function not called
- How to destroy PHP session()
- Upload docx file using PHP script
- Call PHP function on Button click using jquery ajax
- Upload Pdf file using PHP Script
- 403 forbidden error for Image
- PHP Base64 encoding decoding a variable
- PHP 301 Redirect Permanently
- Copy file from one directory to other in Php
- PHP Script to Upload Images to Server
- Installing vue.js in Laravel 8
- PHP Fatal error : Call to a member function bind_param() on a non-object
- PHP.ini: How to Remove URL Forward Slash Before Single or Double Quotes
- macOS - cannot calculate MAC address: Using fd 9 hv_vm_create HV_ERROR [PHP XAMPP]
- Error code 0xCAA82EE2: Something went wrong (request timed out) [Microsoft] - Microsoft
- Struts 2 : There is no Action mapped for namespace [/] and action name [form] associated with context path [/proj] - Java
- Customize Praise badge for Microsoft Teams with own images, values, brand - Microsoft
- INSTALL_FAILED_INSUFFICIENT_STORAGE Error Android Emulator - Android
- remove div vertical scroll - Html
- Select Line Number TextEdit on Mac - MacOS
- [fix] fatal: pathspec index.html did not match any files error - Git
- How to extract Java Jar/War/Ear files in Linux - Java