Re: plz check the warning message

From: Date: Fri, 10 Aug 2001 11:12:48 +0000
Subject: Re: plz check the warning message
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-62156@lists.php.net to get a copy of this message
Hi, Munnik, I am starting the session if authentication is successful and i am closing the session whenever user click on logout button. Here in my case authentication is succesfull and session is started. And i checked the c:\tmp directory. session file is there. But it is not closing the session without starting a session again before closing. I did as u told it works perfect. Thanks alot. Why we have to start again another session before closing. One more doubt..after logging out (it closed the session) and i pressed the back button in browser It has given Warning.page expired. I pressed Refresh button It asked do u want to repost the values again. I pressed retry button. It posted the values again and created session again... Is there anyway to restrict the reposting?? Means after pressing logout button we shouldn't allow the user to go back or reposting the data again and getting session again. Thanks and Regards -Balu ----- Original Message ----- From: Renze Munnik To: Balaji Ankem Cc: php-general@lists.php.net Sent: Friday, August 10, 2001 4:13 PM Subject: Re: [PHP] plz check the warning message 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: renze@datalink.nl -- 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: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

----------------------------------------------------------------------------------------------------------------------- Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:mailadmin@wipro.com and delete this mail from your records. ------------------------------------------------------------------------------------------------------------------------
« previous php.general (#62156) next »