renamed and inserted code to put the data in mysql db