Edit status and write MySQL