finished form validation and moved to dbconnect