Simple question |
[eluser]calumogg[/eluser]
Hi everyone, this is my first time using CI for a project, I have been reading the user guide and experimented with the basics. Now I am updating one of my projects to run on the CI framework. At the start of my controller script I just want to clean all the post data and make it ready for inserting into a database. So in my old scripts I used this code: Code: // For each posted valuse assign the name and value, and make it safe for insterting into a database Is there a better way of doing this in CI? Thanks for the help.
[eluser]Thorpe Obazee[/eluser]
you won't need to use mysql_real_escape_string(). You can either choose to use AR or Query Bindings to automatically 'clean'. Another alternative way is to use $this->db->escape() |
Welcome Guest, Not a member yet? Register Sign In |