I have a question about inserting values into an input field from my MYSQL DB.
First I have a form to save data from an inputfield to the database. An extra script filters diacrits Á=>Á to html code. So Állo will be saved like Állo
When I insert the data from the DB to a ‘div’ it shows Állo. When I insert the data into a input field it shows Állo
What am I doing wrong
I use JQUERY to save data to the DB with the $.post method without pagerefresh. I also get the data from the DB with JQUERY $.post method without pagerefresh.
Hope somebody can help.
you really shouldn’t save htmlentities to your database. you should instead save
Álloand usehtmlspecialshars($my_value_from_db);if its needed (this is php don’t know whats runnung on your server, but there are similar functions for perl or other languages). if you can’t change the saving process or correct al old entries, you could usehtml_entity_decode($bla)for values that are shown in input-fields (this is php again)