0

I'm creating my sixth Cordova app, but this is by far the most complicated one – it will have to upload user-submitted data to a server. The data is basically nine different HTML text fields and the user's coordinates (with cordova-plugin-geolocation).

I've been googling for hours, and I'm still quite lost. I have a little experience with servers, but absolutely none with uploading data to them with Cordova/JS. I figured that you guys and gals probably know a lot more about this than me, so my question is:

What would be the smartest way to upload these ten strings of text to a single file on a remote server? Please note that this is not a single event, so the user must be able to upload several different sets of data over time without the files overwriting the previous files. There will also be many users to this app, so each user should probably have their own subfolder on the server, right?

Thank you so much for your help in advance!

  • @aliczab Yes, some PHP and databases and a bit of SSH, but I'm not at all fluent in any of them. I mainly rely on cPanel whenever I have to deal with servers directly... – Joel Hietala Nov 17 '16 at 17:59
  • Then AJAX request from JS and sending JSON data seems to be right thing. Have you tried? http://stackoverflow.com/questions/8599595/send-json-data-from-javascript-to-php – aliczab Nov 17 '16 at 18:08
  • @aliczab And there I was, thinking that I actually understood anything... I think I'm going to need to learn more about the basics. – Joel Hietala Nov 17 '16 at 20:23
  • It's OK, everybody went through it :) I advise you to setup Apache on your local machine (EasyPHP is OK if you're using Windows), practice with browser first, not Cordova. Also get familiar with your browser's "tools for programmers" menu for tracking your requests. Good luck! – aliczab Nov 17 '16 at 20:37
  • Thanks! :) @aliczab – Joel Hietala Nov 17 '16 at 21:20

0 Answers0