
PHP-Code:
<?php
session_start();
$sec=$_GET['sec'];
$pw="passwort";
if($sec=="login" and $_POST['pussy']==$pw){
$_SESSION['pw']=$pw; header("Location:?sec=in");
}
if($_SESSION['pw']==$pw){
echo "<a href=\"index.php?sec=logout\">LOGOUT</a>
";
if($sec=="in"){ include "panel.php";}
if($sec=="logout"){session_destroy(); header("Location:?");}
}
else{
include "login.php";
}
?>
gruß yoschi
Einen Kommentar schreiben: