Bendude14 Posted September 1, 2008 Share Posted September 1, 2008 Ok, i am using ajax to send some data via POST the problem is retrieving using php. Here is the javascript function validate() { var content = document.getElementById("email").value;//value's to be send using send http.open("POST", url, true); http.onreadystatechange = handleHttpResponse; //Send the proper header information along with the request http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http.setRequestHeader("Content-length", content.length); http.setRequestHeader("Connection", "close"); http.send(content); //alert(content); } Here is the form where the info is been taken from <input type="text" name="email" id="email" onblur="validate(this);" />Email<br /> And then i am trying to retrieve the info like this in php $email = $_POST['email']; But i do not recieve a value like this. I think its the php because using firebug it shows that the value of email was actually sent via POST and i have also tried alerting the content var with javascript it outputs the value typed into the email text box Thanks in advance for any help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.