drunken monkey
21.04.2007, 09:35
Dann musst du logischerweise zuerst das Formular abfragen, und dann erst das Entsprechende ausgeben.
<?php
if (isset ($_POST['username']) &&
isset ($_POST['password']) &&
login_right ($_POST['username'], $_POST['password'])) {
echo 'Willkommen im Adminbereich';
}
else {
if (isset ($_POST['username']) && isset ($_POST['password']))
echo 'Login ungültig';
$pw = '<form method="post" action="index.php">';
$pw.= '<input type="text" name="username">';
$pw.= '<input type="password" name="password">';
$pw.= '<input type="submit">';
$pw.= '</form>';
echo $pw;
}
?>
Die Funktionsdefinition habe ich ausgelassen, die ist ja eh klar.
Powered by vBulletin® Version 4.2.3 Copyright ©2025 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.