Save to *.txt file
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!
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!
andy206uk posted this at 23:07 — 9th May 2005.
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
bja888 (not verified) posted this at 03:04 — 10th May 2005.
They have: 5,633 posts
Joined: Jan 1970
That sounds complacated. Its really simple in ASP, I like to generate *.html pages like that
So which language do you want to use... ASP or Php?
Dont forget you can also use perl!
JeevesBond posted this at 12:08 — 10th May 2005.
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!
andy206uk posted this at 13:09 — 11th May 2005.
He has: 1,758 posts
Joined: Jul 2002
yeah... I was. I just assumed by "save" he wants it to download...
bja888 (not verified) posted this at 16:58 — 11th May 2005.
They have: 5,633 posts
Joined: Jan 1970
.... I hate it when people only post onece.
JeevesBond posted this at 22:54 — 11th May 2005.
He has: 3,956 posts
Joined: Jun 2002
Yeah, that's true... I wonder if he's even read the responses? *sigh*
bja888 (not verified) posted this at 07:45 — 12th May 2005.
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 posted this at 12:31 — 12th May 2005.
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!
a Padded Cell our articles site!
andy206uk posted this at 14:36 — 12th May 2005.
He has: 1,758 posts
Joined: Jul 2002
Perhaps someone should pm or email him...?
bja888 (not verified) posted this at 17:53 — 12th May 2005.
They have: 5,633 posts
Joined: Jan 1970
Thats probaly what he wants us to do. so..... we wont *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.