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

Answer Posted / pawan chhabra

// Create a logout.php file then..

<?php
session_start();
header("location:login.php");
session_destroy();
??

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the arrow mean in php?

751


What is Type hinting in PHP?

896


Explain which cryptographic extension provide generation and verification of digital signatures?

770


List some features of php that are deprecated in php

680


Is server side a session?

661


What is the best way to change the key without changing the value of a php array element?

739


What is inheritance in php? How many types of inheritance supports php?

767


Explain what is the difference between mysql_fetch_array() and mysql_fetch_assoc()?

653


Explain PHP?

798


What is the function of trim?

707


How can I learn php fast?

769


What is a composer?

727


How to block direct directory access in PHP?

722


How can we pass the variable through the navigation between the pages?

725


Where is session value stored?

735