Writing To A File Using Fopen
Their will be many different instances when you might need to write to a file. What we are going to do now is create an HTML form, and a PHP code so when you click submit on the HTML form it writes the users input to a file.
In this PHP script, we are going to be using the /n function, fopen, fput, and fclose commands.
First, we are going create an HTML page that has the following code.
