function check_attempts()
{
$ip = $_SERVER['ADDR_REMOTE'];
$query = mysql_query("SELECT * FROM attempts WHERE ip = '$ip' LIMIT 1") or die("Fatal error at Attempts");
$time = time();
if(mysql_num_rows($query) > 0)
{
$row = mysql_fetch_array($query);
if($row[2] == 10)
{
$_SESSION['error_l'] = "Banovani ste privremeno, ne mozete se upisati ni na jedan racun!";
header("Location: index.php");
}
else
{
if($time >= $row[1])
{
$query2 = mysql_query("UPDATE attempts SET attempts = '0' WHERE ip = '$ip'") or die("Fatal error at Attempts.");
}
else
{
$query2 = mysql_query("UPDATE attempts SET attempts = 'attempts + 1' WHERE ip = '$ip'") or die("Fatal error at Attempts.");
}
}
}
else
{
$time_m = time() + 900;
$query3 = mysql_query("INSERT INTO attempts(ip, tempban, attempts) VALUES('$ip','$time_m','1')")
}
}
Evo napisao sam ovu funkciju i nikako ne mogu nac gresku koju prikazuje.
Greska: : syntax error, unexpected '}' on line 67 . ( U OVOM KODU LINIJA BROJ 28 )
Molio bih za malo pomoci :) .
Edit : izvinite za kod, nesto nece da mi objavi u stilu kod :S