Handling Text file in PHP

After so long time, I was coding in PHP to write certain user inputs in a text file (.txt). Here are the codes that may…