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
What is crypt () in php?
What are the rules to declare a php variables?
What is the function file_get_contents() useful for?
What is ci in php?
How a constant is defined in a php script?
How to open a file in php?
What is user defined function in php?
What is the sign to start variables in PHP?
Why php is used?
Explain about require and include function?
What is the best php version for wordpress?
What is the use of get and post method in php?
Tell us how can we access the data sent through the url with the post method?
Suppose we receive a form submitted by a post to subscribe to a newsletter. This form has only one field, an input text field named email. How would we validate whether the field is empty? Print a message "the email cannot be empty" in this case?
What is the maximum size of a database in mysql?