connected submit to database