I am developing an Android application and I want to store my data in the remote database. I have my index.html, jquery 1.9.1 and test.php.
I want to store the information you submit in index.html to test.php via ajax running my android application.
Do you have any idea how I can do this?
PS: I tested my web application with wamp worked and I know that if you are not in the same domain does not work
Am trying something like this:
Index.html:
<form action="javascript:func();" >
<div id="divSend" >
<input type="button" value="Send" id="send" />
</div>
<div id="divMensagem">
<textarea placeholder="type anything..." rows="6" name="sms" id="sms"></textarea>
</div>
</form>
my file.js:
$(document).ready(function (){
$('#send').bind('click', function (e){
e.preventDefault();
var sms = $('#sms').val();
var p = $.post( 'http://www.domain.com/test/test.php', { sms: sms } );
p.done(function (data){
alert(data);
});
});
});
my index.php:
<php
$sms = $_POST['sms'];
echo $sms;
?>