Save to *.txt file

They have: 1 posts

Joined: May 2005

Hi! I want to create a text area with a submit button, and when someone types something in it, and click, the text saves in a *.txt file. Can anyone help me on this one? thanks!

He has: 1,758 posts

Joined: Jul 2002

you need a bit of server side code. Submit the form to a php file, use the php file to write the submitted text to a text file on the server, then use a header redirect to send the browser to the text file. (you might have to fiddle the mime types to force a download but it can be done!).

Andy

They have: 5,633 posts

Joined: Jan 1970

That sounds complacated. Its really simple in ASP, I like to generate *.html pages like that Smiling
So which language do you want to use... ASP or Php?
Dont forget you can also use perl!

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

Hang on... Andy you're describing the method required to get the file onto the client computer, is this required. Or are you just wishing to store the file on the server?

a Padded Cell our articles site!

He has: 1,758 posts

Joined: Jul 2002

yeah... I was. I just assumed by "save" he wants it to download...

They have: 5,633 posts

Joined: Jan 1970

.... I hate it when people only post onece. Sad

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

Yeah, that's true... I wonder if he's even read the responses? *sigh*

They have: 5,633 posts

Joined: Jan 1970

lol, what if he lost the URL or something. Hes searching franticly through his history but cannot find that one site he posted the question on.

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

Hey, now I feel sorry for him! He's probably posted this on 10's of forums and hasn't bothered to come back yet... Come on mystrydragon, prove me wrong! Laughing out loud

a Padded Cell our articles site!

He has: 1,758 posts

Joined: Jul 2002

Perhaps someone should pm or email him...? Wink

They have: 5,633 posts

Joined: Jan 1970

Thats probaly what he wants us to do. so..... we wont Cool *evil laugh* (fight the system)

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.