<?php
  session_start();
  if(!isset($_SESSION['visited'])){
    header("Location: glowna.php");
    exit();
  }
?>

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Moja strona WWW</title>
  </head>
  <body>
    <p>
      Witamy na stronie index1.php.
    </p>
    <p><a href="glowna.php">glowna.php</a></p>
    <p><a href="index2.php">index2.php</a></p>
  </body>
</html>
