Collects input and submits to the db