0
Hello I am developing a simple thing comment system, I am using php with ajax, and storing in a Mysql database, my question is the following,
entree
$MENSAGEM = filter_var($text, FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP);
how can I avoid from the comments of this type.
pppppp........ ou udaisoduasiudaosidua.... repetindo...
that ends up breaking the whole site?
I know you can do this by adjusting with css, but I wanted to bar this post using php.
my system already counts with login, only those who can post are users!
could you post your code and give more details of your question? The idea would be to create a "black list" of comments? Could explain better the "breaking the whole site"?
– Gabriel Carvalho
simple thing, I’m using php with ajax, and storing in a Mysql database.
– Camila F
Yes, I understood that. But if the field is opened, there is no way to predict what the user will type. A letter different from your rule, will stick. What you can do is send this comment to a moderator for approval before publication. Or also create a "Blacklist" containing the most commonly used words of "spam" and do a treatment before posting, but even so the chance to pass is great.
– Gabriel Carvalho
Problem solved using CSS and Character Limiting and Moderation!
– Camila F
I’ll do it, thank you all!!
– Camila F