HTML interesse |
|
Warning: Cannot modify header information - headers already sent by (output started at /home/cybertec/public_html/movie/inloggen/config.php:5) in /home/cybertec/public_html/movie/inloggen/login.php on line 14
<?php
session_start();
include "config.php";
if(!empty($_POST)) {
$_SESSION["username"]=$_POST["username"];
$_SESSION["password"]=$_POST["password"];
if( $_SESSION['username'] != "$username" || $_SESSION['password'] != "$password") {
die("Je hebt een verkeerde gebruikersnaam of wachtwoord ingevoerd!<br> <a href=\"login.php\">Terug</a>");
session_destroy();
}else{
header("Location: geheim.php");
}
}else{
?>
<html>
<body>
<form method=post action="<? echo($_SERVER["PHP_SELF"]);?>">
Gebruikersnaam: <input name=username><br>
Wachtwoord: <input name=password type=password><br>
<input type=submit value="Inloggen!">
</form>
</body>
</html>
<?php
}
?>
<?php include "config.php"; $_SESSION["username"]=$_POST["username"]; $_SESSION["password"]=$_POST["password"]; if( $_SESSION['username'] != "$username" || $_SESSION['password'] != "$password") { die("Je hebt een verkeerde gebruikersnaam of wachtwoord ingevoerd!<br> <a href=\"login.php\">Terug</a>"); }else{ header("Location: geheim.php"); } }else{ ?> <html> <body> <form method=post action=" <? echo($_SERVER["PHP_SELF"]);? >"> Gebruikersnaam: <input name=username><br> Wachtwoord: <input name=password type=password><br> <input type=submit value="Inloggen!"> </form> </body> </html> <?php } ?>
Weet er iemand wat er fout is ?:|
|