Welcome Guest, Not a member yet? Register   Sign In
Database and quotes
#1

[eluser]Unknown[/eluser]
Hello,

I have a small app based on code igniter which inserts in a database a set of fields from a form.

Sometimes users put some single quotes (') in a text area.
The insert (in my model file $this->db->insert('mytable', $form_data)Wink goes ok but in the databaes the quotes are stored as the following string: "'"

Is there a way to correctly store quotes?

The column charset is set as utf8
The $form_data array is populated this way in the controller: 'my_field' => set_value('my_field')

Thanks in advance
#2

[eluser]Aljebrini[/eluser]
i wish you have this useful

http://ellislab.com/codeigniter/user-gui...elper.html , i don't really know how Mysql encode the single quote may be you have to find such thing about this




Theme © iAndrew 2016 - Forum software by © MyBB