mardi 5 juillet 2016

Add character "&" in mySQL database through PHP & iOS [duplicate]

This question already has an answer here:

I am currently building an iOS app and have variable containing some text that I am sending to a PHP file through POST.

This variable is saved to a table in my database and it works great except for one thing. When the variable contains the character "&", the string being saved stops at that character.

Example : if I try to save "M&Ms", only "M" will be saved in the table and "&Ms" will be gone.

Do you know how I can make it work ?

I tried using : htmlentities, urlencode, mysql_real_escape_string.

Nothing worked

Aucun commentaire:

Enregistrer un commentaire