$_SESSION['logged'] = 1;
if($_SESSION['logged'] != 1) { print "<script>location.href='error.php'</script>"; }