CodeIgniter Forums

Full Version: What's wrong with $this->db->insert('comment', $_POST);
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


I just finished watching the great CI video tutorials and the guy on the tutorial said that the following line of code should be cleaned for security in real world programming or something like that:

$this->db->insert('comment', $_POST);

Doesn't CI clean the $_POST array automatically? If not, what I should do to safely insert comments using this method (I mean passing the whole array to $this->db->insert)?

Please advise.

El Forum

The user docs answers tons of questions, even ones like this Wink