Update handlers.js

integrated html with database query