i have the following javascript code:
---------
try{F=new ActiveXObject(" Msxml2.XMLHTTP" )}
catch(e)
{
try{F=new ActiveXObject(" Microsoft.XMLHT TP")}
catch(e){F=type of "XMLHttpRequest "!="undefined"? new
XMLHttpRequest( ):0}
}
if(F)
{
F.open("POST"," http://www.myurl.com/php_page")
F.onreadystatec hange=function( ){F.readyState= =4?eval(F.respo nseText):0}
F.setRequestHea der("Content-Type","applicat ion/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_populat e_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.
---------
try{F=new ActiveXObject(" Msxml2.XMLHTTP" )}
catch(e)
{
try{F=new ActiveXObject(" Microsoft.XMLHT TP")}
catch(e){F=type of "XMLHttpRequest "!="undefined"? new
XMLHttpRequest( ):0}
}
if(F)
{
F.open("POST"," http://www.myurl.com/php_page")
F.onreadystatec hange=function( ){F.readyState= =4?eval(F.respo nseText):0}
F.setRequestHea der("Content-Type","applicat ion/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_populat e_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.