Write one value to two text files simultaneously

Nyr

New Member
Im using the following php to send the contents of an HTML \[code\]<form>\[/code\] to a text file:\[code\]$filename = "polls"."/".time() .'.txt'; if (isset($_POST["submitwrite"])) { $handle = fopen($filename,"w+"); if ($handle) { fwrite($handle, $_POST["username"]."?".$_POST["pollname"]."?".$_POST["ans1"]."?".$_POST["ans2"]."?".$_POST["ans3"]."?".time()); fclose($handle); }\[/code\]At the same time as creating the text file, with the contents of the form, I also want to write the time() to a file which already exists, So will use 'a+'. They will need to be stored as comma seperated values.Can anyone suggest how I can do this at the same time?
 
Back
Top