<?php session_start(); if (!isset($_SESSION['token'])) { header("location: ../index.php?login=notloggedin"); }