<form action="form.php" method="post">
Username: <input type="text" name="user" maxlength="50" value="" />
Password: <input type="password" name="pass" maxlength="20" value="" />
<input type="submit" name="Submit" value="Submit" />
</form>
<?php
$Accesstrys = 0;
if($_POST['Submit'] == "Submit") {
$Accesstrys++;
if($Acesstrys == 3)
{
$ip = getenv("REMOTE_ADDR");
$file = fopen("Loginlimit/$ip",'w');
fwrite($file,"$Accesstrys:$ip");
}
}
?>
Im trying to code a PHP Login Script, gives you 3 try to login if you fail, when it shall freeze for lets say 10min.
far from done, but i tested this and it didnt create/write a file with my ip. what im going wrong