Šťastný.eu (http://xn--astn-8ra90d2a.eu)
500 Wii Points For Free - Wii.cooltre.com 

PHP + Ajax - How to safe pass data (UTF8)?

27.04.2009, Happy, main   Bookmark and Share

How to safe pass data between Javascript (Ajax) and PHP?

Did you ever fight with the way how to successfully in PHP decode data passed and escaped by Javascript (Ajax)? And what about UTF8? Just read bellow...

The solution of this problem is really easy, instead of javascript:escape(UTF8 string) use javascript:encodeURI(UTF8 string), and then in PHP use urldecode()!

Javascript: encodeURI(UTF8 string);

PHP: urldecode();

Šťastný.eu >>

blog comments powered by Disqus