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

Answer Posted / murali

session can be destroyed by using session_destroy() function
and variable can be unset by unset($_session['name']), and
also write like this...
$_session['name']=='';
you can assign null.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does mysqli_query return?

702


Why triggers are used in mysql?

724


Which function is used in php to check the data type of any variable?

705


How is it possible to set an infinite execution time for php script?

719


Write a program to show the joining of two strings in php?

730


How does php sessions work?

702


How can we execute a php script using command line?

718


Explain what is meant by pear in php?

712


What is meant by ‘passing the variable by value and reference' in php?

746


What is difference between post and put in rest?

724


Why do you need php?

734


What is the use of header in php?

706


How to create a table using php?

752


How can you send email in php?

748


What is explode() in php?

756