I am building an obscure application which is only available after an involved sign-up process, so submitting malicious data should not occur often.
I use Codeigniter 2.1 to filter all POST variables. Codeigniter uses the PHP function mysql_real_escape_string
among other measures to prevent a sql injection attack through POST data.
I do all my validation client-side using JavaScript. The JavaScript validation runs well. Of course, a user could use cURL or some other utility to bypass the client-side validation, but the stock PHP validation in Codeigniter should prevent SQL injection, right?
Can I do my validation client-side and trust Codeigniter to protect the database from a SQL injection attack?