You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
331 B
PHP
15 lines
331 B
PHP
<?php
|
|
// 1. Rozpoczęcie sesji, aby mieć do niej dostęp
|
|
session_start();
|
|
|
|
// 2. Usunięcie wszystkich zmiennych sesyjnych (user_id, role, username)
|
|
session_unset();
|
|
|
|
// 3. Całkowite zniszczenie sesji na serwerze
|
|
session_destroy();
|
|
|
|
// 4. Przekierowanie użytkownika do strony logowania
|
|
header("Location: login.php");
|
|
exit();
|
|
?>
|