HTML help. Can I get forms to save information to file?

Kelvrick

Lifer
Feb 14, 2001
18,422
5
81
Hi.

I'm writing a page right now that includes a form. I know how to make it email and crap, but can anyone help me on making it save to a file? This isn't a geocities thing, but a website that is actually served off of a computer. If you can, could you include a peice of sample code so that the page will save to say, an excel or text file?

I have access to web software like dreamweaver ultra dev and stuff like that.

Thanks.
 

GagHalfrunt

Lifer
Apr 19, 2001
25,284
1,998
126
You need to have some sort of server-side scripting language, either Perl, PHP or ASP most likely. What have you got available?
 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
i'm sure you can do it in ultradev, but i never have. i know for a fact that you can do it in frontpage... it might not be very clean, but it's quick and easy... they have a tool. the only thing is you have to have front page extensions enabled on the server.
 

rutchtkim

Golden Member
Aug 2, 2001
1,880
0
0
like GagHalfrunt said, there really isnt a way to do it in HTML alone. Try finding some code online for saving to a text file. I would suggest coding in perl
 

royaldank

Diamond Member
Apr 19, 2001
5,440
0
0
You can use a little perl script.

Once you have the variables in perl, you can do the following to open a file, write whatever you want to it, and then close the file. You might have to play around with it in depending on if you are creating or appending to a file.

$file="output.txt";
open(INFILE,">$file");
seek(INFILE,0,0); # jump to beginning of file
print INFILE $variables; # write out any variables...'\n' for a new line...use as many lines as you wish
close INFILE;

If you need help getting the variables in Perl, let me know and I could help you with that as well.
 

20_MuleTeam_Borax

Senior member
Oct 9, 1999
681
0
0


<<
This isn't a geocities thing, but a website that is actually served off of a computer.
>>



. . . as opposed to geocities who serve up websites w/o computers? Sorry, just being a smart ass.