Edit function for code works with database

Everyone can edit everyone's code as there is no checking.