0
I am developing an application with Extjs 4 and PHP. My problem is this: How do I make it so that the user can’t access an application page without being logged in? I’ve tried everything (I know), but it’s like HTML ignores the check I do.
Page indexPrincipal:
<!DOCTYPE HTML>
<?php
include('connect.php');
session_start();
if (!$_SESSION['logado']){
header("Location: index.html");
session_destroy();
}
?>
<html>
<head>
<meta charset="UTF-8">
<title>SIG - Sistema Integrado de Gestão - EMCM/RN</title>
<!-- <x-compile> -->
<!-- <x-bootstrap> -->
<link rel="stylesheet" href="bootstrap.css">
<link rel="stylesheet" href="resources/css/app.css">
<script src="ext/ext-dev.js"></script>
<script src="bootstrap.js"></script>
<!-- </x-bootstrap> -->
<script src="app.js"></script>
<!--<script type="text/javascript" src="app/view/Login.js"></script>-->
<!-- </x-compile> -->
</head>
<body></body>
</html>
Just a hint: put one
die
orexit()
after thesession_destroy
– Lucas