Store Ampersands and other chareters in mysql
22-01-2010 |
|
0 phản hồi »
Question:
Hi,
I have a text input box for users to leave messages. I have noticed that if one of them uses an ampersand the rest of the text is cut off and not stored in the database. I have tried many things like mysql_real_escape_string() and encodeURI but nothing solve the problem. What can I do to make ampersands and other characters safe for mysql storage?
thanks,
waffe
Solution:
you have the ENCODE the & before putting it into the URL. and urlencode(‘&’) shall solve that.

















Phản hồi (0)
Trackbacks - Pingbacks (0)