Guest Stunner Posted December 25, 2005 Share Posted December 25, 2005 Well, i am trying to make a form and when u submit it, it saves to a txt file that i can view later. Can someone help me with this? Link to comment Share on other sites More sharing options...
hgx Posted December 25, 2005 Share Posted December 25, 2005 You Can use FSO!! Exp:dim Fso,TxtFileSet Fso=Server.Createobject("Scripting.FileSystemObject")Set TxtFile=Fso.OpenTxtFile(ServerMapPath("SomeTxtFile.txt"),2,true) ' SomeTxtFile.txt Means: The txt file Path Which you want to write.' 2 Means: open txt file by write only' true means: if the txt file is not exists then create itTxtFile.WriteLine (Request.Form("FormData"))TxtFile.CloseSet TxtFile=NothingSet Fso=Nothing Well, i am trying to make a form and when u submit it, it saves to a txt file that i can view later. Can someone help me with this?<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
lugos Posted December 30, 2005 Share Posted December 30, 2005 Well, i am trying to make a form and when u submit it, it saves to a txt file that i can view later. Can someone help me with this?<{POST_SNAPBACK}> You'll probably need server-side scripting to accomplish that. Something like PHP, ASP, Pearl, etc. You can also e-mail yourself the text, which will also require server-side scripting. Link to comment Share on other sites More sharing options...
aspnetguy Posted December 30, 2005 Share Posted December 30, 2005 You Can use FSO!! Exp:dim Fso,TxtFileSet Fso=Server.Createobject("Scripting.FileSystemObject")Set TxtFile=Fso.OpenTxtFile(ServerMapPath("SomeTxtFile.txt"),2,true) ' SomeTxtFile.txt Means: The txt file Path Which you want to write.' 2 Means: open txt file by write only' true means: if the txt file is not exists then create itTxtFile.WriteLine (Request.Form("FormData"))TxtFile.CloseSet TxtFile=NothingSet Fso=Nothing<{POST_SNAPBACK}> This is ASP (VBScript). It is a very simple solution. PHP probably has a very similar approach. Link to comment Share on other sites More sharing options...
Chocolate570 Posted December 30, 2005 Share Posted December 30, 2005 PHP does have a similar approach, since it can read/write to files, but i'm not sure about creating. And i don't know how to use the function Link to comment Share on other sites More sharing options...
lugos Posted December 30, 2005 Share Posted December 30, 2005 Well, i am trying to make a form and when u submit it, it saves to a txt file that i can view later. Can someone help me with this?<{POST_SNAPBACK}> w3schools.com has an overview of file handling in PHP. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now