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

Answer Posted / devendrarjadav

session_destroy() function destroys all data registered to
current session. use unset function to destroy varible
specified with session. So to destroy $name registered with
session use unset($name) in your php script.

Is This Answer Correct ?    16 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is php a cms?

526


What is the use of inner join in mysql?

535


How do you pass a variable by value?

581


What is the different between count() and sizeof() in php?

516


What is the difference between characters 23 and x23?

549






What's the difference between __sleep and __wakeup?

546


What is csrf token and why it is required?

536


Is php used in 2019?

531


iam mca post graduate in 2010 not getting job in JAVA so iam looking for carear in php as market demand is high so it is best option to try for php or not

1452


What is properties of class?

587


How to convert a json string to an array in php?

555


what is the use of include_once in php?

533


What websites use php?

517


How to create a directory?

615


what are interfaces and Abstart classes

1461