Worked on PHP

Getting closer, have gotten it to write to the correct file, just
having an issue having it write the correct data