What are the ways we can destroy a session variable ?
Answer Posted / jeevi
it will destroy all the variables.
session.invalidate();
if you want to destroy individual variables, use this command.
session.removeAttribute("sessionvariablename");
| Is This Answer Correct ? | 3 Yes | 14 No |
Post New Answer View All Answers
What are different types of runtime errors in php?
What is a trait in php?
What is difference between session and cookie in PHP?
What are magic methods?
Explain what is the difference between session and cookie?
Why do we use interface in php?
How do I sort numbers in php?
What are psrs?
If the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?
What PHP stands for?
What is the difference between single quoted string and double quoted string?
How to remove html tags from data in php?
What is php good for?
What does $_server means?
Explain me what is the importance of "method" attribute in a html form?