Q:

user data to php from a mobile app

I am making an app with HTML/Javascript/jQuery, and packaging it with phoneGap, for iOS/Android. I am attempting to send user input gathered data from a form on my mobile app, to a php file on my server. Since the app will not be living on the server/using php on device, does anyone have a decent article/how to that I can reference to look into this? I imagine I will never to capture and send the variables with javascript, send to a php file on my server to be processed, then I want to send that info to email.
Sorry I don't have code, this is more of a general question.

A:

You can use ajax my friend
formData = {
    param1: $("#param1").val(),
    param2: $("#param2").val()
}
$.ajax({
    type: "get",
    url: "http://example.com/create.php",
    data: formData,
    dataType: "json",
    success: function(data) {
        alert("Create success");
    },
    error: function() {
        alert("Edit user failure");
    }
});

Reference: http://blog.revivalx.com/2014/07/15/simple-hybrid-mobile-app-using-cordova-and-ratchet-2-complete/

