On my local network... I'm running Apache, PHP, and MariaDB on a Linux machine.
The following code doesn't work.
I'm trying to close MariaDB, clear Session variables, lose/destroy the Session and... Redirect to another page.
Redirect works if it is the only thing in the code but then how do I get all the other stuff done?
Thanks for any help.
The following code doesn't work.
I'm trying to close MariaDB, clear Session variables, lose/destroy the Session and... Redirect to another page.
Redirect works if it is the only thing in the code but then how do I get all the other stuff done?
Thanks for any help.
<?php // login check
session_start();
if (!$_SESSION['loggedin']){
header('Location: user_signin.php'); // if not loggedin goto signin page
exit;
}
?>
<?php
mysqli_close($con); // close MariaDB
session_start();
$_SESSION = array(); // Clear Session Variables
session_destroy(); // destroy the Session
header("location: index.php"); // rediredt to welcome page
exit;
?>