Mein Formular postet das Passwort in passwd und die E-Mail Adresse in mail.
Der Code sieht so aus:
Code: Alles auswählen
<html>
<head><title>check_login</title></head>
<body bgcolor="black"></body>
</html>
<?php
$mail = $_POST["mail"];
$passwort = $_POST["passwd"];
If (file_exists("C:\shape\users\\$mail.txt"))
{
$datei = fopen("C:\shape\users\\$mail.txt", "r+");
$line1 = fgets($datei, 1024);
$line2 = fgets($datei, 1024);
$line3 = fgets($datei, 1024);
$line4 = fgets($datei, 1024);
$line5 = fgets($datei, 1024);
$line6 = fgets($datei, 1024);
if ($passwort == $line4) {
echo '<center><font color="#FF0000">OK</font>';
}
else
echo '<center><font color="#FF0000">Das Passwort ist falsch.</font>';;
}
else
echo '<center><font color="#FF0000">An der E-Mail Adresse stimmt etwas nicht.</font>';;
?>
Max
Mustermann
test@test.de
test
ABC-Dorf
Deutschland
Und trägt den Namen test@test.de.txt.