saving all the changes in php