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

Discussion in 'HTML' started by Guy, Dec 5, 2003.

  1. Guy

    Guy Guest

    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>
     
    Guy, Dec 5, 2003
    #1
    1. Advertising

  2. Guy

    brucie Guest

    brucie, Dec 5, 2003
    #2
    1. Advertising

  3. "Guy" <> wrote in message news:<7xTzb.4934$>...
    > 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.

    --
    Hywel
     
    Hywel Jenkins, Dec 5, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Megha Vishwanath
    Replies:
    2
    Views:
    9,910
    tutorialsmaster
    Oct 2, 2009
  2. Don Adams
    Replies:
    1
    Views:
    617
    Martin Honnen
    Mar 5, 2004
  3. yaffa
    Replies:
    3
    Views:
    387
    Kent Johnson
    Aug 4, 2005
  4. Kamarulnizam Rahim
    Replies:
    4
    Views:
    237
    Robert Klemme
    Jan 28, 2011
  5. Megha Vishwanath
    Replies:
    3
    Views:
    785
    Megha Vishwanath
    Jul 20, 2004
Loading...

Share This Page