loquela Posted March 5, 2009 Share Posted March 5, 2009 Hi there, I have a very simple commenting system in php/mysql. I would like to prevent users from posing multiple comments within, say, 5min. No idea how to go about this. Any takers? :-\ Link to comment https://forums.phpfreaks.com/topic/148142-time-limit-re-posting/ Share on other sites More sharing options...
jackpf Posted March 5, 2009 Share Posted March 5, 2009 Easiest way would probably be to set a cookie, and if the cookie exists, don't let them comment. However, the flaw in this is that they could potentially just delete their cookies. If you wanted it really secure, you could store everyone's ip address in a mysql table and the timestamp they posted. Then if someone's ip is in the table and they posted in the last five minutes, don't let them post. good luck. Link to comment https://forums.phpfreaks.com/topic/148142-time-limit-re-posting/#findComment-777674 Share on other sites More sharing options...
loquela Posted March 6, 2009 Author Share Posted March 6, 2009 Thanks jackpf, I think I'll start with the cookie idea first and move on the ip check if I feel the need as this will be a bit more work. Link to comment https://forums.phpfreaks.com/topic/148142-time-limit-re-posting/#findComment-778103 Share on other sites More sharing options...
jackpf Posted March 6, 2009 Share Posted March 6, 2009 No problem Link to comment https://forums.phpfreaks.com/topic/148142-time-limit-re-posting/#findComment-778135 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.