Menu
I am trying to call a php file with AJAX with the POST method.
I give
ajax.send(“variablename=”+FormText.value)
FormText.value is something entered by user and can have ‘&’ embedded in it. If that happens the .php does not get the full string but treats the part following the & as a second variable. I tried replacing ‘&’ with ‘#38’ before the calling ajax.send but that did not work. php received the string as ‘8’ instead. Currently I am replacing ‘&’ with ‘#amp’ and that seems to be working. What is the correct way to encode ‘&’
TIA
Tushar