You are here: problem with sending json encoded data to php via ajax « PHP Language « IT news, forums, messages
problem with sending json encoded data to php via ajax

Posted by Pugi! on 01/09/08 11:34

I am using AJAX (the YUI connection manager) to send the input from a
form (all fields added to an object called data and the json encoded)
to a php script. The charset for the webpage (valid XHTML), in the
php.ini and httpd.conf (and mysql db) is utf-8.
The php script is unable to json_decode the data when there is a °
present (symbol for degrees) when send by IE7 (still ok for FF, Safari
and Opera), the script is unable to json_decode the data when an & is
send by all the browsers.
I think the solution might be to use the escape function in javascript
and urldecode function in php, but I can't get it to work. The php
urldecode function is not the exact opposite of the javascript escape
function. Do you use escape and decode on the data, the query string
or the entire url ?

Pugi!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация