hey all,
I have a question about checking session in html page:
The variables that is sent through all pages is "user logged in name",and the session name is =username as well,
I added a php condition in html page to check if the session variable was null (null if anybody tried to access without logging in) or not>>if yes redirect to login page else view the page....but its not working properly :S
the goal is no user will be able to access this html directly without logging in.
piece from the code:
HTML Code:
<?php
session_start();
if(! $_SESSION['ses_name']){
header("Location: http://home/project/login.html");
exit;
}
?>
<html>
<head>
<title>Insert record</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
body {
background-color: #EEEEEE;
}
hope I'll find some help,