Line 3
Hier ist der Code:
in der Line 3 steht somit:
Was ist hier falsch?
Georg
Hier ist der Code:
PHP-Code:
<?php
session_start ();
$admin = "admin" ;
$password = "passwort" ;
echo $_POST ["loginname" ]. "<br>" ;
echo $_POST ["loginpasswort" ]. "<br>" ;
if(isset( $_POST ["action" ]))
{
if ( $_POST ["loginname" ] == $admin && $_POST ["loginpasswort" ] == $password )
{
$_SESSION ["loginpasswort" ] = $loginpasswort ;
$_SESSION ["loginname" ] = $loginname ;
echo "es geht" ;
}
else
{
echo "Logindaten Falsch" ;
}
}
else {
?>
<form method="POST" action="login.php">
<div align="center">
<center>
<table border="0" cellspacing="0" width="445">
<tr>
<td width="441" colspan="2"><font face="Arial" size="3"><u><b>Admin-Login</b></u></font></td>
</tr>
<tr>
<td width="82"><font face="Arial" size="2">Loginname:</font></td>
<td width="359"><input type="text" name="loginname" size="20"></td>
</tr>
<tr>
<td width="82"><font face="Arial" size="2">Passwort:</font></td>
<td width="359"><input type="password" name="loginpasswort" size="20"><input type="hidden" name="action" size="20" value="ok"></td>
</tr>
</table>
</center>
</div>
<p align="center"><input type="submit" value="login"><input type="reset" value="löschen"></p>
</form>
<?
}
?>
PHP-Code:
$admin = "admin" ;
Georg
Kommentar