will the following html code submit the contents of the file?

G

Guy

Believe it or not, I never saw the file-type input tag until tonight.
I didn't know you could have a browse button on an HTML document!

So now, I'd like to submit a file to our server.
In my initial tests, I am attaching a text file containing only about 20
characters.

Is this how it works?
Will the following code submit the file content after I select the file with
the browse button and click the submit button.

Also, what does the accept parameter do?

Thanks for all,
Guy D


<HTML>
<BODY>
<FORM name=sendmsg method=POST enctype="multipart/form-data"
action="cgi-bin/test.pl">

<INPUT type=file size=40 name=af accept="*/*">
<INPUT type=submit>

</FORM>
</BODY>
</HTML>
 
H

Hywel Jenkins

Guy said:
So now, I'd like to submit a file to our server.
In my initial tests, I am attaching a text file containing only about 20
characters.

Is this how it works?

Is that how what works?

Will the following code submit the file content after I select the file with
the browse button and click the submit button.
Yes.


Also, what does the accept parameter do?

Usually, nothing. It's supposed to set the filter in the file dialog.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top