Php ile form spam form mesajlarını limitleme…

 

 

SELECT COUNT(*) attempts, MAX(submit_time)last
FROM form_submits
WHERE user_id =?
AND submit_time > NOW - INTERVAL 2 MINUTE
if($row['attempts']>0){

    echo "You must wait ".(time()- strtotime($row['last']))." seconds before you can submit this form again.";return;}