How can I control my website's inputs when they are entered by users? : <p>I have a question and answer website like SO. I have some limitations on some of facilities. For example an user cannot vote who has less than 20 reputation. Or an user cannot close a question until earning at least 200 reputation.</p>

<p>Ok well, there is also somethings which don't have any limitation, like writing an answer for questions. In this case, <strong>a bad user</strong> can write multiple irrelevant answers for multiple questions and makes my database huge with useless information.</p>

<p>So I guess I need to check something before inserting a new answer, Am I right? Or anyway, how can I manage my website's inputs? As I mentioned, in my current algorithm, a bad user <em>(like a spammer or hacker)</em> can simply enter lots of useless data in my database, and then maybe I understand it after 1 day <em>(which is too late)</em> which in this case, it takes some times to block him and remove all his data.</p>

<p>In conclusion, I like to know, <em>(for example)</em>, how a website like SO handle that? Do I need a separated query before inserting a new answer for checking? Or what? </p>

<p><strong>Note:</strong> I use PHP <em>(for server-side codes)</em> and MySQL <em>(for database codes)</em>.</p>
