Re: session_destroy
| From: | David Otton | Date: | Wed, 10 Oct 2001 17:23:18 +0000 |
| Subject: | Re: session_destroy | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70710@lists.php.net to get a copy of this message | ||
On Wed, 10 Oct 2001 21:12:51 +0530, you wrote:
>i just use session_destroy() to destroy the session. but i'm getting the following error :
>Warning: Trying to destroy uninitialized session in C:\Program Files\Apache
>Group\Apache\htdocs/sms/logout.php on line 2
><?
>session_destroy()
>?>
>how do i delete a session.
You have to tell the script you're using the session first. Try this:
<?
session_start();
session_destroy();
?>
djo