php unset session variable 1

php unset session variable

// Destroy a sesion variable name 'variable_name' 

Here is what the above code is Doing:
1. The session_start() function must be the very first thing in your document. Before any HTML tags.
2. The PHP code in the example above simply starts a new session.
3. The PHP code in the example above simply sets a session variable called counter to 1.
4. The PHP code in the example above simply increments the session variable counter with 1.
5. The PHP code in the example above simply prints out the session variable counter.
6. The PHP code in the example above simply destroys the session variable counter.

Similar Posts