The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

the file not created problem most likely relates to the folder permissions on the folder you are trying to write to... the requirement will vary from server to server so you might as well keep working your way up until the file creation works. Are you getting a specific error?

i'm not sure if theres a function to remove new lines, maybe you could just use str_replace?

In case anyone needs to write the contents of a form to a text file and doesn't want any user carriage returns (from inside <textarea></textarea>) to result, use this function. Line breaks that appear in a text file will cause problems if you want to import into Excel, for example;