javascript - Correct way to encode JSON and store in MYSQL? -


I am encoding my javascript ARX using JSON.stringify in javascript, send php to them via asxx Before mysql (btw) - $ i_OST, my example looks like an array (1 item)

  [\ "shon thomson \"]   

And after mysql_real_escape_string it looks like

  [\\\ "Shawn Thomson \\\"]   

ends in mysql like

  [\ "Shawn Thomson \"]   

What is the right way to do this, this It ends (

  ["Sean Thomson"]   

?

Thank you for your help.

Try using mysql_real_escape_string instead.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -