× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> You are right on the money!  How do I send a file to a CGI program would
> be my next question?

You might need to change around how the CGI takes in data a bit, but here's
what to do from the HTML side of things.  Here are the tags needed for
having someone upload a file to the server:

The first thing you need to do is fix up your <form> tag.

<form enctype="multipart/form-data" method=post action="[your cgi]">

The enctype allows whole files to be sent without being immediately
interpreted by the server.

Next, the actual <input> tag:

<input type=file name="the_file">

That's the most simple tag there is for sending files - it's just a text box
where they type in the location of the file on their machine (e.g.
"c:\temp\clients.xml").  I'm also fairly certain that the tag will give you
a "Browse" button as well, so the user can go through his/her directory
structure and find the file if necessary.  I'm about to go double-check
that, though, to make sure my memory isn't faulty.

CGI side, you'll just have to adapt the code to find "the_file" and ship it
out to your XML parser - from there, you should be able to do whatever you
like with it!

Hope this helps!
Erik
- http://www.baron-inc.net




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.