PHP-Code:
<?php
session_start();
include 'func.php';
if(isset($_POST['login'])){
$userid=check_user($_POST['username'], $_POST['password']);
if($userid!=false){
login($userid);
}
else{
echo 'Ihre Anmeldedaten waren nicht korrekt!';
}
}
if(!logged_in()){
echo'<form action="eingeloggt.php" METHOD="POST">
<label>Username: </label><input type="text" name="username"><br>
<label>Password: </label><input type="password" name="password"><br>
<input type="submit" id="login" name="login" value="login">
</form>';
}
?>
Woran scheiterts hier!?
Einen Kommentar schreiben: