Forum Moderators: coopster
UserBob: hey
UserBob: hey
UserBob: hey
UserBob: hey
UserBob: hey
UserBob: hey
UserSandy: stop
UserBob: hey
UserBob: hey
UserBob: hey
UserBob: hey
UserBob: hey
Anyways, what I'd like to do is prevent a user from posting the same line over and over...at the very least prevent the very next post from being the same as the previous post. I'd like to be able to do this without checking the database first to see if the previous row is the same as the newest post; I feel there should be an easier way.
Any ideas?
Maybe store the post in a session variable? I'm not sure how that would correlate with other users though. Hmm...
With a hidden from field I'd still have to pull out the users last post which would be a database call...I want to avoid doing that because it would bog down the script even more in the long run(it's used a lot, I need to preserve CPU memory on php scripts).
I would have thought that most people who are likely to be doing that sort of spam are not likely to be intelligent enough to just turn off javascript.
There will be some that get through, but try it and see. As if your cpu is taking a bit of a hammering this is a solution that doesnt eat any more of your resources.
Sessions would be great, however they will eat up more resources.
[edited by: PHP_Chimp at 8:30 pm (utc) on July 16, 2008]