1 person found this helpful
Your first example is what you need to do, but you'd only add the "#FDF" at the end if the server script returns an FDF in response. Leaveit off otherwise.
The script can do the job of saving the incoming FDF to a file on the server, which is a fairly simple opertation. It then has to return a response (HTML, empty response, FDF containing a confirmation/error message, redirect, etc.)
Your second example is not something that can work.
Do they really not allow Perl scripts to be used?
Thanks for responding.
GoDaddy's economy hosting plan does not allow Perl, Python, or Ruby CGI. But that is something I will have to deal with.
Please tell me how that CGI script does the job of saving the FDF file on the server. After the CGI file is created by my website vistor submitting the form, do I then have to go in and execute the script? Or can it somehow work without user intervention to save the FDF file?
No, there is nothing additional you need to do. The CGI script is what processes the incoming data from the PDF form submission. Part of that processing is saving the FDF to a file on the server. The second part would be returning a response to the client, which is required.
To clarify, when a form is submitted, a chunk of data (content) is sent by the client to the CGI program (script) on the server. The CGI program then takes the chunk of data (in this case, FDF) and does something with it. It could read the FDF contents and save the data it contains to a database, save the raw FDF to a file, do nothing at all with it, or anything else. The CGI program then has to return some sort of response back to the client, which I discussed before.