|
Posted by adamsbarker on 02/11/06 10:05
i have the following javascript code:
---------
try{F=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e)
{
try{F=new ActiveXObject("Microsoft.XMLHTTP")}
catch(e){F=typeof "XMLHttpRequest"!="undefined"?new
XMLHttpRequest():0}
}
if(F)
{
F.open("POST","http://www.myurl.com/php_page")
F.onreadystatechange=function(){F.readyState==4?eval(F.responseText):0}
F.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
F.send("foo=bar&stuff=test")
}
--------
when i run this in firefox 1.5 the "post" fields are recognised by php,
however, when i use internet explorer 6.0 the "post" fields are not
recognised by php. i have checked the headers sent in IE and they
appear to be correct (eg, Content-Type =
application/x-www-form-urlencoded"...). as suggested in another post, i
have enabled the "always_populate_raw_post_data" directive in my
php.ini file, yet the "post" fields still don't exist.. also, when
running phpinfo() on the page that is being posted to,
$_SERVER["REQUEST_METHOD"] = "GET" - something is wrong here. is it
something to do with the the script above, the browser or the server?
thanks for any help,
adam.
[Back to original message]
|