server side mysql prototype for data insertion