Question:
Can I make an HTML form send inputs to a different file each time it is filled out?
anonymous
2008-03-06 17:49:33 UTC
I need a single form that users can fill out multiple times, and each time it sends the input values to a different file. Is that possible?

Thanks.
Four answers:
Warren O
2008-03-06 17:57:56 UTC
Yes, but it involves knowledge of either Perl (for unix servers) or asp (for windows servers). You will have to write your own program that runs on the server side to process the inputs and put them into their own files. I have never learned asp, so I am a little biased when I say that I would use Perl. It has much power and good flexibility.
JDeal
2008-03-06 18:06:29 UTC
Great! That extra info helps a lot. You can open a file and write a new line to it using ASP very easily. It will append to the end of the file, so all existing lines will still be there.

Here's the best resource for it:

http://www.w3schools.com/asp/met_opentextfile.asp



Name your page test.asp (needs to be ASP to run, and needs to be on a Windows server).

Then add this to the body somewhere:





testread.txt is the file you want to write to. The above link and example use the name "testread.txt" - but this can be changed to anything.
daa
2008-03-06 18:07:48 UTC
A single form can only send to one processing script, but that script can certainly do different things based on a user's prior inputs.
The ∞ Wiseone ♂
2008-03-06 18:20:59 UTC
No


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...