sending post data to php
brand new to titanium, been playing with it for about an hour. can someone tell me how to send POST data from an html form into PHP? and please, be detailed, im new and im having a hard time understanding from the little code snippets im seeing. thanks!
3 Answers
-
you would normally use the XHR client
var xhr = Ti.Network.createHttpClient(); xhr.onreadystatechange=function() { if (this.readyState==4) { // post completed } }; xhr.open("POST","http://my.com/url.php"); xhr.send("key=value&pair=boo");
-
Ok, but what about when i have file on a local machine? I don't have http server and i want to send some data to some file in resource directory ?
for example:i have two files: index.php and index2.php. I want to send post data from form from index.php to index2.php without http server ?
-
Ok, but what about when i have file on a local machine? I don't have http server and i want to send some data to some file in resource directory ?
for example:i have two files: index.php and index2.php. I want to send post data from form from index.php to index2.php without http server ?