View sourcecode

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

check_login.php

10 lines UTF-8 Unix (LF)
1
2
3
4
5
6
7
8
9
10
<?php
// starta sessionen
session_start();

// Om session-variabeln username inte finns
if(!isset($_SESSION['username'])){
    
// skicka till index.php med meddelande
    
header('location: index.php?mess=Du är inte inloggad.');
}