How many ways you can delete a session variable ?
Answers were Sorted based on User's Feedback
Answer / chetan
session_destroy()
....// it will delete all session variables at once
unset
session_unregister()
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / anoop
The correct answer is 4 ways .
1 UNSET();
2 session_unset()
3 seesion_unregister()
4 session_destroy()
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / anuj kumar gupta
session_destroy() — Destroys all data registered to a session
session_unregister() — Unregister a global variable from the
current session
session_unset() — Free all session variables
If globals is on, you'll have to unset the
$_SESSION[varname] as well as the $varname.
Like:
unset($_SESSION[varname]);
unset($varname);
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / hemant gore
unset($_SESSION)
session_unset()
seesion_unregister()
session_destroy()
| Is This Answer Correct ? | 3 Yes | 0 No |
What interest would a "work-for-ownership" offer receive from PHP/MySQL developers?
Does php have future?
how to insert logout time when browser close
Is php better than python?
Tell me how do I escape data before storing it into the database?
What is stripslashes php?
What type of operation is needed when passing values through a form or an url?
What is php regular expression?
If the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?
What is use of mysqli_query in php?
Write a program to upload a file in php?
Explain mysql_errno()?