PHP-Newbie: LOGIN-Script

Beitrag lesen

Hallo! Danke erstmal für eure Antworten!

Also die Formulare stimmen! Hier nochmal die Formulare;

LOGIN.HTML

<HTML>
   <HEAD>
   </HEAD>
   <BODY bgcolor="#FF0000">
      <form method="post" action="login.php">
      <table border="0">
         <tr>
            <td>
               <table border="0">
                  <tr>
                     <td><img src="images/key.ico"></img></td>
                     <td valign="middle"><font size="+1"><b>Authentifizierung</b></font></td>
                  </tr>
               </table>
            </td>
         </tr>
         <tr>
            <td><font size="-1"><b>Benutzername</b></font><br><input type="text" name="username" maxlength="20"></td>
         </tr>
         <tr>
            <td><font size="-1"><b>Password</b></font><br><input type="password" name="password" maxlength="20">&nbsp;&nbsp;&nbsp;<input type="submit" value="Login"></td>
         </tr>
         <tr>
            <td><br></td>
         </tr>
      </table>
      </form>
   </BODY>
</HTML>

EDIT_USER.PHP

<?
if ($edit)
{
$handler = fopen("user.txt","w");
if(fputs($handler, $textfile)) {
$gespeichert = 1;}
fclose($handler);
}
?>

<HTML>
   <HEAD>
   </HEAD>
   <BODY bgcolor="#E6E6FA">
   <table width="100%" border="0">
      <tr>
         <td>
            <FORM ACTION="edit_user.php" METHOD="post">
            <table border="0">
               <tr>
                  <td colspan="2"><font size="+1"><b>Administratoren bearbeiten:</b></font></td>
               <tr>
                  <td><input type="hidden" name="edit" value="1"><TEXTAREA NAME="textfile" COLS="40" ROWS="15"><?readfile("user.txt");?></TEXTAREA></td>
               <tr>
                  <td><INPUT TYPE="Submit" VALUE="Speichern">&nbsp;&nbsp;&nbsp;<input type="button" onclick="javascript:location.reload()" value="Aktualisieren">&nbsp;&nbsp;&nbsp;<? if($gespeichert){echo "<font color=FF0000>Auml;nderungen erfolgreich gespeichert!</font>";}?></td>
            </table>
            </FORM>
         </td>
      </tr>
      <tr>
         <td>
            <form method="post" action="eintragen.php">
            <table border="0">
               <tr>
                  <td colspan="2"><br><br><br><font size="+1"><b>Administrator hinzuf&uuml;gen:</b></font></td>
               <tr>
                  <td><b>Benutzername:</b></td>
                  <td><input type="text" name="username"></td>
               <tr>
                  <td><b>Password:</b></td>
                  <td><input type="password" name="password"></td>
               <tr>
                  <td><b>Password wiederholen:</b></td>
                  <td><input type="password" name="password2"></td>
               <tr>
                  <td></td>
                  <td><INPUT TYPE="submit" VALUE="Hinzuf&uuml;gen"></td>
            </table>
            </FORM>
         </td>
      </tr>
   </table>
   </BODY>
</HTML>

So mehr habe ich nicht! Das ist alles was mit dem Login zu tun hat!

Könntet ihr mir zeigen, was ich falsch gemacht habe und es eventuell einbauen, damit ich es besser nachvollziehen kann!?