<?php
session_start();
if(!isset($_SESSION['myusername']) and ($_SESSION['recht']!=30){
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('U bent niet bevoegt voor deze applicatie')
window.location.href='../home.php'
</SCRIPT>");
}
else {
//Echo the page
}
?>
I want to make a page secure by using the following requirements:
You must have filled the $_SESSION['myusername']
and You can only login when $_SESSION['recht']
is equal to 30.
I can't get this to work. I would really appreciate if you could help me.