Working data transfer from db to web

Need to make code better