• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.