Bug fixing on sending data to database

Bugfixing and stopped app crash on sending but still need to but a
spiner to alert the user that the data is in the process of begin sent.