Tutorial on forms for the web?
Well, it looks like I have to get my hands grody with web forms, and haven't a clue where to start in this new shiny standards-based web.
Anyone have a pointer or three to lend?
Basically I need to allow the user to upload a file, where the backend will fire off a batch job, then present the results back to the user as a new file.
Anyone have a pointer or three to lend?
Basically I need to allow the user to upload a file, where the backend will fire off a batch job, then present the results back to the user as a new file.
Comments
Originally posted by Kickaha
Well, it looks like I have to get my hands grody with web forms, and haven't a clue where to start in this new shiny standards-based web.
Anyone have a pointer or three to lend?
Basically I need to allow the user to upload a file, where the backend will fire off a batch job, then present the results back to the user as a new file.
What language will you be using? PHP? Perl? I'd recommend perl if you're going to be doing text processing or server related stuff on the file.
Apache/PHP can be configured to allow file uploads.
Apache/Perl can also do the same, but is not as easy to do (so my sysadmin tells me).
Parsing through a file is better left to Perl. PHP's regexp set is nowhere as useful as perl's.
Allowing users to upload a file to your server does have some secuirty implications.
IMHO, I would set up a form with TEXTAREA fields (for large anounts of free flowing text) and have the users copy and paste the data into the TEXTAREA fields. Then submit the form to either a .cgi (perl) or .php script that will parse the fields and build the output.
Be sure to remeber to CHECK the data and to take care of any system commands that might find their way into the text.
If you can outline the process a bit more I bet we can give more helpful ideas.
I want users to be able to upload an XML file for batch processing on our machines. The results, also XML, will be then presented to the user.
I need three things: 1) uploading the file, 2) triggering the process (just a shell command), 3) presenting the data.
Edit: Okay, it looks like this page gives the basic format I want, and I just need to modify it, and hook it into the backend.