xmlhttp.open('POST',url); xhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhttp.send("name=" + encodeURIComponent(user_name) + "&email=" + encodeURIComponent(user_email) );