Create a text file every time you click click on the save button, and save what you type in a textarea
In other words, if I press the save button 3 times, I should create a file with this:
file1.txt first click
file2.txt second click
file3.txt third click, etc, etc.
I have this code:
if(isset($_POST["txtareainst"]))
{
if($_POST["txtareainst"])
{
$contenido=$_POST["txtareainst"];
$archivo='D:instruccion.txt';
$file = fopen($archivo, 'ab') or die ();
fwrite ($file, $contenido.PHP_EOL);
fclose($file);
echo "He recibido en el archivo.php: ".$_POST["txtareainst"];
}
else
{echo "He recibido un campo vacio";}
}