View Full Version : spam prevent

01-04-2007, 08:03 AM
i have a script on my site that will let people email other members is there anyway i can have a timer on it so after some one sends a message they will have to wait 1 minute to send another message?

01-04-2007, 08:48 AM
Well, you add a parameter (collumn) to your database called: "last_minute_sent". Then, you send a query that gets that parameter from the database. Then, you compare it with the acual time...

if ($last_minute_sent = time(m)) { $error = true; $response = "Wait another minute, please."; header(redirect somewhere...);}
else sendMessage();


01-04-2007, 07:40 PM
hi Shaffer
i don't understand is this all the code i will need?and all i need for the database?sorry im some what new to this thanks