logout and redirecting session in php
<?php
session_start();
session_unset();
session_destroy();
header("location:home.php");
exit();
?>
<?php
session_start();
session_destroy();
header("Location: home.php");
?>
Only this is necessary
session_start();
unset($_SESSION["nome"]); // where $_SESSION["nome"] is your own variable. if you do not have one use only this as follow **session_unset();**
header("Location: home.php");
Use this instead:
<?
session_start();
session_unset();
session_destroy();
header("location:home.php");
exit();
?>