Just to deviate slightly, with a native app you would listen for a success response when you post something to the server - so the server talks to the app; if there is no server response then you know the server is unavailable. You wouldn't just check for a data connection to be live as that can be unreliable; you need a success response.
You need to check that the transfer can and has been made. Remember if someone is on the move they could have a connection but it could be so poor that it is unreliable. In which case it might make sense to store the data.
With saving the data, with native apps and web apps you can access local storage; using HTML 5: http://paperkilledrock.com/2010/05/html5-localstorage-part-one/