I've been getting irritated by this bug, and I've tried to fix it but it's been a struggle for me. So I have a php file write to a .txt file, but as I enter different info, it replaces the info that was already in the file, but I don't want it to do that. I want it to add on. Help?
<?php
$filenum = echo rand();
$info = $_GET["info"]; //You have to get the form data
$file = fopen('$filenum.txt', 'w+'); //Open your .txt file
$content = $info. PHP_EOL .$gain. PHP_EOL .$offset;
fwrite($file , $content); //Now lets write it in there
fclose($file ); //Finally close our .txt
die(header("Location: ".$_SERVER["HTTP_REFERER"]));
?>