script that converts to a table tag the data in the database in javascript