change UI and use mysql to read and insert