is there any php code (or other code for that matter) that captures the information entered in textfields and outputs it as a readable textfile or legible file and places it a designated folder on the webserver?
@NogDogJun 14.2005 — #[code=php] $folder = "/home/username/formdata"; $file = "$folder/form_input_" . time() . ".txt"; # use time for unique file name $delimiter = "t"; # field delimiter for text file, in this example a tab character if($handle = fopen($file, 'w')) { foreach($_POST as $key => $val) { fwrite($handle, "$key$delimiter$val"); } fclose($handle); } else { echo "<p>ERROR: Unable to open file $file for writing.</p>n"; } [/code]
@xredawg909xauthorJun 15.2005 — #a question.. this is for a form submit online, when multiple people submit their forms, will the code automatically label them differently? (i.e. Fquote.txt, Fquote2.txt, etc.., etc..) or will it overwrite each time someone submits a form?
@NogDogJun 15.2005 — #The example I gave will include a timestamp value with each file name, so each file will be unique (unless two requests get processed within the same second). You could make it more unique if there is a user ID or some other unique value you could add to the file name.