title: AJAX POST and Plus ( + ) and (&) Sign How to Encode?
body: <p>I'm POSTing the contents of a form field via <code>AJAX to a PHP script</code> and using this code</p>
  
  <pre><code>if(!http)
              http = CreateObject();  
  
          nocache = Math.random();
  
          http.open('post', 'addvm.php');
          http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 
          http.setRequestHeader("Content-length", params.length);
          http.setRequestHeader("Connection", "close");
          http.onreadystatechange = SaveReply;
  
          http.send(params);
  </code></pre>
  
  <p>The problem is that any <code>+ and &amp;</code> signs are being stripped out and replaced. How can I safely 'encode' the <code>+ and &amp;</code> signs and then appropriately 'decode' it on the PHP side?</p>