Previous: Basic PHP eCommerce site. Part 1, The shopping basket
Next: Feeling the cold

AJAX Tips: The great escape

When developing applications with AJAX functionality, it is common to pull a value from a text area and pass in into a url for processing.

When doing this, always be sure to add the escape() function around your variables, to ensure they are URL Encoded, otherwise you'll loose parts of your text and your code will fall apart.

If you've escaped a variable, for passing between  functions rather than a url, you can remove the formatting with the unescape() function.

Comments

No comments have been added.

Add a comment

0 comments