Webbserverprogrammering 1

Show sourcecode

The following files exists in this folder. Click to view.

webbserverprogrammering/submissions/projekt-matkort-handler/

.github/
add_logs.php
admin/
api/
card_balance.php
classes/
config/
food_logs.php
forgot_password.php
includes/
index.php
insert_restaurants.php
install.php
login.php
logout.php
public/
register.php
reset_password.php
verify.php

logout.php

18 lines UTF-8 Windows (CRLF)
<?php
session_start
();

// Ta bort alla session-variabler
$_SESSION = array();

// Radera session cookies
if (isset($_COOKIE[session_name()])) {
  
setcookie(session_name(), ''time() - 3600'/');
}

// Förstör sessionen
session_destroy();

// Omdirigera till startsida
header("Location: index.php");
exit();
?>