hey! Iv'e made a login and for every unsuccessful login attempt, Iv'e had it write to a file (login.log) with information (time, date etc).
It's writes to the file no problem... but when another unsuccessful login attempt occurs, it erases the previous unsuccessful login attempt from the file, and writes the new unsuccessful login attempt.
Does anyone know how I can make it so that all previous login attempts are kept in the file at all times?
Here's the bit of the code im using so far...
$time = time();
$date = strftime("%H:%M, %A, %d %B", $time);
$file = "login.log";
$fp = fopen($file, "w");
$fw = fwrite($fp, "[Access Denied] - Using Account [$username] - At Time & Date: $date\n");
fclose($fp);
Hope somebody can help.
Regards, Stezz.