gistlib
main.php<?php session_start(); // Login if(isset($_POST['login'])){ $_SESSION['loggedin'] = true; // Add your login authentication here // Redirect to dashboard or any other page after successful login header('Location: dashboard.php'); exit; } // Logout if(isset($_POST['logout'])){ session_unset(); session_destroy(); header('Location: login.php'); // Redirect to login page after logout exit; } ?> 433 chars23 lines
<?php session_start(); // Login if(isset($_POST['login'])){ $_SESSION['loggedin'] = true; // Add your login authentication here // Redirect to dashboard or any other page after successful login header('Location: dashboard.php'); exit; } // Logout if(isset($_POST['logout'])){ session_unset(); session_destroy(); header('Location: login.php'); // Redirect to login page after logout exit; } ?>
gistlibby LogSnag