$time_diff = time() - $sent;
$time_diff = intval($time_diff / 60);
if($sent_mail < 30) {
// in here is a page built will php which contains its own if statements
}elseif ($time_dif >= 1) {
mysql_query("Truncate table time");
mysql_query("Truncate table email_count");
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=maillists.php">'; //should load page user wanted to go to.
}
else{
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=limit.php">'; //redierct user when they can't send any more emails.
}
i want the code to check if the messages sent is greater than 30 if it is not it displays the code from the page. this part works fine.
the elseif statement should check if the time passed is greater than 1 minute since last message sent then it should truncate the tables and display the page stated which is the page that the code is on.
if the messages sent is less than 30 and i wait 5 minutes it still sends me to the limit.php page how can i get it to load the page the code is held on if the time passed is greater than 1 minute.
if you need to look at anymore of my code please ask and i will upload it.