Answers for "logout in php"

PHP
1

logout in php

<?php
if(isset($_GET['logout'])) {
    session_destroy();
    unset($_SESSION['uname']);
    header('location:login.php');
}
?>
Posted by: Guest on June-15-2020
0

logout in php

if(isset($_GET['logout'])) {
    session_destroy();
    unset($_SESSION['username']);
    header('location:login.php');
}
Posted by: Guest on May-04-2020
0

php logout

<?php

ob_start();
if (!isset($_SESSION))
    session_start();
unset($_SESSION['user_id']);
session_destroy();
header("location:index.php");
Posted by: Guest on October-03-2021

Browse Popular Code Answers by Language