tested it using a 3 email per hour limit and it didnt seem to end. maybe i need a proper if statement? either that or interval 1 hour isn't recognized. here is the piece of the script:
//anti abuse - makes sure no more than 250 emails are sent out in one hour
mysql_query("INSERT INTO antiabuse (emailsent)
VALUES ('1')");
$result = mysql_query('select count(*) from antiabuse where `time` > curtime() - interval 1 hour');
$row = mysql_fetch_row($result);
$count = $row[0];
if ($count > 3) {
die('Sorry, please wait and try again in a few minutes.');
}
//then if it doesn't end from the anti abuse script, the send email script starts below
$to = "$xemail";
|