<% '***************************************************** '* Code written by Alexander Haneng (C) 1998-2001 * '* FREE download from http://www.haneng.com/ * '***************************************************** 'Type in the path of the file to use. Make sure that the script has write access. MyFile = "guestbook.txt" 'Ready Scripting.FileSystemObject Set MyFileObj=Server.CreateObject("Scripting.FileSystemObject") 'Opens textfile. 8 = add line to file, true = create if it doesn't exists Set MyOutStream=MyFileObj.OpenTextFile(MyFile, 8, TRUE) 'Writes the line to the file New_line = Request.Form("new_line") New_line = Server.HTMLEncode(New_line) 'Adds the time and date it was posted New_line = "Posted: " & NOW & "
" & New_line MyOutStream.WriteLine(New_line) 'Closes the file MyOutStream.Close 'Sends them back to the default page Response.Redirect "default.asp" %>