<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
XMLHttpRequest is asyncronous by default, so do this:<br>
<br>
<pre wrap="">p.open("POST", <a class="moz-txt-link-rfc2396E" href="http://xxx.yyy.com/process.php">"http://xxx.yyy.com/process.php"</a>, <b>true</b>);
var myResult = p.responseXML

or if you want it to be async, do
p.onload=myfunc
before the open();
</pre>
<br>
<br>
Biju G C wrote:<br>
<blockquote type="cite"
 cite="mid20030911025545.88513.qmail@web14603.mail.yahoo.com">
  <pre wrap="">Hi,

  using XMLHttpRequest() object
  how can "POST" some information to a PHP script
  and how do i retrieve that info in PHP script.

I tried following.
   var p = new XMLHttpRequest();
   p.open("POST", <a class="moz-txt-link-rfc2396E" href="http://xxx.yyy.com/process.php">"http://xxx.yyy.com/process.php"</a>, false);
   p.send("code=aaaa");
but, I was not able to capture data in php script

PS:  I was able to send data as query string.
   var p = new XMLHttpRequest();
   p.open("POST", <a class="moz-txt-link-rfc2396E" href="http://xxx.yyy.com/process.php?code=aaaa">"http://xxx.yyy.com/process.php?code=aaaa"</a>, false);
   p.send(null);

Thanks in advance.


________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger <a class="moz-txt-link-freetext" href="http://mail.messenger.yahoo.co.uk">http://mail.messenger.yahoo.co.uk</a>
_______________________________________________
Project_owners mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Project_owners@mozdev.org">Project_owners@mozdev.org</a>
<a class="moz-txt-link-freetext" href="http://mozdev.org/mailman/listinfo/project_owners">http://mozdev.org/mailman/listinfo/project_owners</a>
  </pre>
</blockquote>
</body>
</html>