How can we destroy the session, how can we unset the variable of a session?

How can we destroy the session, how can we unset the variable of a session?

How can we destroy the session, how can we unset the variable of a session?

View Answers

November 15, 2010 at 5:25 PM

Hi all,

You can destroy session by using session_destroy() function.

You can unset the variable of a session by using unset($session['name']), and you can also assign null value like $session['name']==' '.

Thanks









Related Tutorials/Questions & Answers:
How can we destroy the session, how can we unset the variable of a session?
How can we destroy the cookie?
Advertisements
How can we register the variables into a session?
How can we know that a session is started or not?
How many cookie object we can store in a session? is there any limit?
How many ways can we get the value of current session id?
How many ways we can pass the variable through the navigation between the pages?
Can we declare a static variable inside a method?
How we can create a table through procedure ?
how can we store the encrypted passwaord in swings?
How can we repair a MySQL table?
how we can create website through java
How can we get hibernate statistics?
How can we save a data list in jsf?
How can we solve this puzzle using java ?
How do we create session factory in hibernate?
How many ways we can give the output to a browser?
How can we encrypt the username and password using PHP?
How can we create a database using PHP and mysql?
How can we increase the execution time of a php script?
how can we prevent back option after log out.
How can we know the count/number of elements of an array?
what is cloud computing? any how we can implement?
How can we submit a form without a submit button?
How can we find the number of rows in a result set using PHP?
How can we get second of the current time using date function?
how can we pass parameters from jsp href to another servlet
How can we implement Pop-up in JQuery without Plugin?
What is the maximum size of a file that can be uploaded using PHP and how can we change this?
How I can cast a variable in Scala?
How I can cast a variable in Scala?
how can i make a session invalidate in java when browser is closed
How can we know the number of days between two given dates using PHP?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
we can create our own header file in java?n how to create?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How can we extract string 'roseindia.net ' from a string http://[email protected] net using regular expression of php?
How can we get the properties (size, type, width, height) of an image using php image functions?
How we can integrate ASP .net website to payment gateway using SOAP xml request and response using wsdl.
How to destroy a cookie?
how to destroy java thread
struts2 how can we add an radio button to form using a class(doa)
struts2 how can we add an radio button to form using a class(doa)
What is the default session time in php and how can I change it?
session_unset()

Ads