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

How does api connect to database?

558


What is the use of htmlentities in php?

502


How to write in a file in php?

530


What is empty php?

493


Is nan in php?

529






What are the method available in form submitting?

527


Tell me what is the importance of "action" attribute in a html form?

531


How to add comments in php?

604


When use javascript vs php?

534


Code to upload a file in PHP?

553


Is php 5 still supported?

522


What does session start do in php?

507


What is the functionality of the functions strstr() and stristr()?

523


What is var_dump?

582


How to write php function in html onclick?

525