I have problem when I logout in an admin panel with the logout page session. It shows the following error:
Fatal error: Uncaught Error: Call to undefined function redirect() in C:\xampp\htdocs\CMS\admin\logout.php:7 Stack trace: #0 {main} thrown in C:\xampp\htdocs\CMS\admin\logout.php on line 7
Instead, it should show the login page. My code:
<?php include("includes/header.php");?>
<?php
$session->logout();
redirect("login.php");
?>