PHP Code:
$query = mysql_query("SELECT *, SUM(`times`) as amount FROM vote WHERE account='$account' OR ip='$ip'");
$cccc = mysql_query("SELECT (`times`) FROM vote WHERE account='$account' OR ip='$ip'");
$lasttime = mysql_fetch_array($query);
$amount = $lasttime['amount'];
$insertnew = false;
if ($amount == "") {
$insertnew = true;
}
if ($cccc >= 5) {
$xxx = mysql_query("UPDATE account.account SET status = 'BLOCK' WHERE login='$account'");
header("Location: http://www.google.ch");
exit;
}






