On Fri, Aug 10, 2001 at 04:08:19PM +0530, Balaji Ankem wrote:
> Hi, munnik,
> 
>       thankyou for u'r help.
> 
> I am getting the following warning while closing session.
> 
> 
> Warning: Trying to destroy uninitialized session in c:\www\logout.php on line 3
> session closed for 85744 
> 
> 
> Plz do the needful. I am sending the following files.
> 
> 
> 
> logout.php
> 
> <?php
> session_unregister(emp_id);
> session_destroy();
> echo "session closed for $emp_id";
> ?>
> <!DOCTYPE (...)
> (...) </HTML>
> 


I just gave a quick look, but I think you forgot (or didn't know to)
add session_start() to your code. So it will be:

<?php
session_start();        /* <-- This is it! */
session_unregister(emp_id);
session_destroy();
echo "session closed for $emp_id";
?>
<!DOCTYPE (...)
(...) </HTML>

Otherwise you don't have any session to destroy...


-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to