Forum Moderators: coopster
I've got a PHP form processor running that sends the forms fields via email and then writes the email address of the sender to a text file on the server.
I've got it working perfectly except when it writes the email address to the text file, it puts them all on the same line. I need to get it to put each address on the next line down. This is probably a pretty simple thing to do but my eyes are bugging after trying for a while now.
If anyone could help, it would be appreciated.
Here is the code that writes to the text file:
////////////write to file///////////
$out = fopen("/home/myserver/leads.txt","a");
if (!$out) {
print("Could not append to file");
exit;
}
$T1 = $_POST[$reply_to_field];
fwrite($out,"$T1\t");
fclose($out);