PHP / MySQL

  1. Home
  2. Computing & Technology
  3. PHP / MySQL

Session_destroy () PHP Function

By Angela Bradley, About.com

Definition: Session_destroy() destroys all of the data associated with the current session, however it does not unset any of the global variables associated with the session, nor does it unset the session cookie. It is often used with session_unset() to more thoroughly remove the session.
Also Known As: Destroy PHP Session
Examples:
<?php
// you have to open the session first
session_start();

//remove all the variables in the session
session_unset();

// destroy the session
session_destroy();
?>

Explore PHP / MySQL

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

PHP / MySQL

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. PHP Functions
  5. PHP Session Destroy - Session Destroy Function- PHP Session Destroy Function

©2009 About.com, a part of The New York Times Company.

All rights reserved.