What's Wrong with this HTML?

Discussion in 'HTML' started by PHPBABY3, Mar 1, 2009.

  1. PHPBABY3

    PHPBABY3 Guest

    <form action="DUDESAMPLE.php" method="post">
    File:<INPUT TYPE="FILE" NAME="uploadfile" VALUE="ABC"></input></form>

    The default value of ABC does not appear.

    (I copied this straight from a web site example.)

    Help!

    C-B
    PHPBABY3, Mar 1, 2009
    #1
    1. Advertising

  2. While the city slept, PHPBABY3 feverishly typed:

    > <form action="DUDESAMPLE.php" method="post">
    > File:<INPUT TYPE="FILE" NAME="uploadfile" VALUE="ABC"></input></form>
    >
    > The default value of ABC does not appear.


    file inputs generally do not support the value attribute for security
    reasons. If you think about it, you could have a self-submitting form that
    will upload a file from the user's computer without them even knowing it had
    happened.

    > (I copied this straight from a web site example.)


    Which website?

    Cheers,
    Nige

    --
    Nigel Moss | http://www.nigenet.org.uk
    Email not valid. - take the dog out!
    "You're mother ate my dog!", "Not all of him..."
    nice.guy.nige, Mar 1, 2009
    #2
    1. Advertising

  3. PHPBABY3 wrote:

    > <form action="DUDESAMPLE.php" method="post">
    > File:<INPUT TYPE="FILE" NAME="uploadfile" VALUE="ABC"></input></form>


    There are gross errors. To begin with, you didn't post the URL. You also
    have a form without a submit button, so it cannot normally be submitted at
    all. You're using a misguided end tag, in fake XHTML style. You're not
    setting enctype for the form; file submission won't work with the default
    enctype. And do you have any real form handler?

    > The default value of ABC does not appear.


    You're not using the right browser then. Some old versions of Opera actually
    implemented setting default file name for form submission. But even Opera
    thinks now, for good or bad, that such features are too serious a security
    risk, so Opera ignores the NAME attribute, like everyone else.

    > (I copied this straight from a web site example.)


    Either you copied lousily, or the site is very lousy.

    More info in my dusty document (which is still probably the best on the
    topic of file submission):
    http://www.cs.tut.fi/~jkorpela/forms/file.html

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Mar 1, 2009
    #3
  4. PHPBABY3

    PHPBABY3 Guest

    On Mar 1, 4:50 pm, "nice.guy.nige" <> wrote:
    > While the city slept,  PHPBABY3 feverishly typed:
    >
    > > <form action="DUDESAMPLE.php" method="post">
    > > File:<INPUT TYPE="FILE" NAME="uploadfile" VALUE="ABC"></input></form>

    >
    > > The default value of ABC does not appear.

    >
    > file inputs generally do not support the value attribute for security
    > reasons. If you think about it, you could have a self-submitting form that
    > will upload a file from the user's computer without them even knowing it had
    > happened.
    >
    > > (I copied this straight from a web site example.)

    >
    > Which website?


    I didn't note but they all do it. Here is a complete file - and I
    just noticed that I can't type anything in - it just browses for the
    file name:

    <html>
    <form action="http://www.cs.tut.fi/cgi-bin/run/~jkorpela/echo.cgi"
    enctype="multipart/form-data" method="post">
    <p>
    Type some text (if you like):<br>
    <input type="text" name="textline" size="30">
    </p>
    <p>
    Please specify a file, or a set of files:<br>
    <input type="file" name="datafile" size="40">
    </p>
    <div>
    <input type="submit" value="Send">
    </div>
    </form>
    </html>

    > Cheers,
    > Nige
    >
    > --
    > Nigel Moss |http://www.nigenet.org.uk
    > Email not valid. - take the dog out!
    > "You're mother ate my dog!", "Not all of him..."
    PHPBABY3, Mar 1, 2009
    #4
  5. While the city slept, PHPBABY3 feverishly typed:
    > Please specify a file, or a set of files:<br>
    > <input type="file" name="datafile" size="40">


    You can only get one file from this, so "a set of files" (unless they are
    zipped or otherwise archived into a single file) isn't going to work.

    Cheers,
    Nige

    --
    Nigel Moss | http://www.nigenet.org.uk
    Email not valid. - take the dog out!
    "You're mother ate my dog!", "Not all of him..."
    nice.guy.nige, Mar 2, 2009
    #5
  6. PHPBABY3 wrote:
    > On Mar 1, 4:50 pm, "nice.guy.nige" <> wrote:
    >> While the city slept, PHPBABY3 feverishly typed:
    >>
    >>> <form action="DUDESAMPLE.php" method="post">
    >>> File:<INPUT TYPE="FILE" NAME="uploadfile" VALUE="ABC"></input></form>
    >>> The default value of ABC does not appear.

    >> file inputs generally do not support the value attribute for security
    >> reasons. If you think about it, you could have a self-submitting form that
    >> will upload a file from the user's computer without them even knowing it had
    >> happened.
    >>
    >>> (I copied this straight from a web site example.)

    >> Which website?

    >
    > I didn't note but they all do it. Here is a complete file - and I
    > just noticed that I can't type anything in - it just browses for the
    > file name:
    >
    > <html>
    > <form action="http://www.cs.tut.fi/cgi-bin/run/~jkorpela/echo.cgi"
    > enctype="multipart/form-data" method="post">
    > <p>
    > Type some text (if you like):<br>
    > <input type="text" name="textline" size="30">
    > </p>
    > <p>
    > Please specify a file, or a set of files:<br>
    > <input type="file" name="datafile" size="40">
    > </p>
    > <div>
    > <input type="submit" value="Send">
    > </div>
    > </form>
    > </html>


    Your question was about a file-type input tag with a value attribute
    that you expected to see. The purported example above has no value
    attribute.
    Harlan Messinger, Mar 2, 2009
    #6
  7. Jukka K. Korpela wrote:
    > PHPBABY3 wrote:
    >
    >> <form action="DUDESAMPLE.php" method="post">
    >> File:<INPUT TYPE="FILE" NAME="uploadfile" VALUE="ABC"></input></form>

    >
    > There are gross errors. To begin with, you didn't post the URL. You also
    > have a form without a submit button, so it cannot normally be submitted
    > at all. You're using a misguided end tag, in fake XHTML style. You're
    > not setting enctype for the form; file submission won't work with the
    > default enctype. And do you have any real form handler?
    >
    >> The default value of ABC does not appear.

    >
    > You're not using the right browser then. Some old versions of Opera
    > actually implemented setting default file name for form submission. But
    > even Opera thinks now, for good or bad, that such features are too
    > serious a security risk, so Opera ignores the NAME attribute, like
    > everyone else.
    >
    >> (I copied this straight from a web site example.)

    >
    > Either you copied lousily, or the site is very lousy.
    >
    > More info in my dusty document (which is still probably the best on the
    > topic of file submission):
    > http://www.cs.tut.fi/~jkorpela/forms/file.html
    >

    That's the page he copied his example from.
    Harlan Messinger, Mar 2, 2009
    #7
  8. Harlan Messinger wrote:

    >>> <form action="DUDESAMPLE.php" method="post">
    >>> File:<INPUT TYPE="FILE" NAME="uploadfile"
    >>> VALUE="ABC"></input></form>

    [...]
    >> http://www.cs.tut.fi/~jkorpela/forms/file.html
    >>

    > That's the page he copied his example from.


    Are you clueless, unacceptably lazy, or just a liar?

    I surely know I wrote nothing of the kind on that page of mine.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Mar 2, 2009
    #8
  9. Jukka K. Korpela wrote:
    > Harlan Messinger wrote:
    >
    >>>> <form action="DUDESAMPLE.php" method="post">
    >>>> File:<INPUT TYPE="FILE" NAME="uploadfile"
    >>>> VALUE="ABC"></input></form>

    > [...]
    >>> http://www.cs.tut.fi/~jkorpela/forms/file.html
    >>>

    >> That's the page he copied his example from.

    >
    > Are you clueless, unacceptably lazy, or just a liar?
    >
    > I surely know I wrote nothing of the kind on that page of mine.
    >

    I meant the example he claimed to be a real life example of what he was
    talking about (even though it turned out not to be) in his second
    posting. So stop being such an vengeful ass, Jukka.
    Harlan Messinger, Mar 2, 2009
    #9
  10. Harlan Messinger wrote:
    > Jukka K. Korpela wrote:
    >> Harlan Messinger wrote:
    >>
    >>>>> <form action="DUDESAMPLE.php" method="post">
    >>>>> File:<INPUT TYPE="FILE" NAME="uploadfile"
    >>>>> VALUE="ABC"></input></form>

    >> [...]
    >>>> http://www.cs.tut.fi/~jkorpela/forms/file.html
    >>>>
    >>> That's the page he copied his example from.

    >>
    >> Are you clueless, unacceptably lazy, or just a liar?
    >>
    >> I surely know I wrote nothing of the kind on that page of mine.
    >>

    > I meant the example he claimed to be a real life example of what he
    > was talking about (even though it turned out not to be) in his second
    > posting. So stop being such an vengeful ass, Jukka.


    So what you wrote was a blatant lie. Thank you for making it clear.

    (You had the opportunity of explaining your mistake and apologizing. You
    chose to add yet another stupid insult.)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Mar 2, 2009
    #10
  11. Jukka K. Korpela wrote:
    > Harlan Messinger wrote:
    >> Jukka K. Korpela wrote:
    >>> Harlan Messinger wrote:
    >>>
    >>>>>> <form action="DUDESAMPLE.php" method="post">
    >>>>>> File:<INPUT TYPE="FILE" NAME="uploadfile"
    >>>>>> VALUE="ABC"></input></form>
    >>> [...]
    >>>>> http://www.cs.tut.fi/~jkorpela/forms/file.html
    >>>>>
    >>>> That's the page he copied his example from.
    >>>
    >>> Are you clueless, unacceptably lazy, or just a liar?
    >>>
    >>> I surely know I wrote nothing of the kind on that page of mine.
    >>>

    >> I meant the example he claimed to be a real life example of what he
    >> was talking about (even though it turned out not to be) in his second
    >> posting. So stop being such an vengeful ass, Jukka.

    >
    > So what you wrote was a blatant lie. Thank you for making it clear.


    Because you misunderstood what I was talking about?

    >
    > (You had the opportunity of explaining your mistake and apologizing. You
    > chose to add yet another stupid insult.)


    *I* should apologize when you mistakenly called me a liar? I wonder if
    you even know what "lie" means.
    Harlan Messinger, Mar 2, 2009
    #11
  12. PHPBABY3

    PHPBABY3 Guest

    On Mar 1, 5:51 pm, "Jukka K. Korpela" <> wrote:
    > PHPBABY3 wrote:
    > > <form action="DUDESAMPLE.php" method="post">
    > > File:<INPUT TYPE="FILE" NAME="uploadfile" VALUE="ABC"></input></form>

    >
    > There are gross errors.


    Then wouldn't the smart thing to do be to give the minimal HTML that
    works correctly (instead of wasting time harping on how bad the HTML
    is)?

    C-B

    > To begin with, you didn't post the URL. You also
    > have a form without a submit button, so it cannot normally be submitted at
    > all. You're using a misguided end tag, in fake XHTML style. You're not
    > setting enctype for the form; file submission won't work with the default
    > enctype. And do you have any real form handler?
    >
    > > The default value of ABC does not appear.

    >
    > You're not using the right browser then. Some old versions of Opera actually
    > implemented setting default file name for form submission. But even Opera
    > thinks now, for good or bad, that such features are too serious a security
    > risk, so Opera ignores the NAME attribute, like everyone else.
    >
    > > (I copied this straight from a web site example.)

    >
    > Either you copied lousily, or the site is very lousy.
    >
    > More info in my dusty document (which is still probably the best on the
    > topic of file submission):http://www.cs.tut.fi/~jkorpela/forms/file.html
    >
    > --
    > Yucca,http://www.cs.tut.fi/~jkorpela/
    PHPBABY3, Mar 24, 2009
    #12
  13. PHPBABY3

    Chaddy2222 Guest

    On Mar 24, 8:11 pm, PHPBABY3 <> wrote:
    > On Mar 1, 5:51 pm, "Jukka K. Korpela" <> wrote:
    >
    > > PHPBABY3 wrote:
    > > > <form action="DUDESAMPLE.php" method="post">
    > > > File:<INPUT TYPE="FILE" NAME="uploadfile" VALUE="ABC"></input></form>

    >
    > > There are gross errors.

    >
    > Then wouldn't the smart thing to do be to give the minimal HTML that
    > works correctly (instead of wasting time harping on how bad the HTML
    > is)?
    >
    > C-B
    >
    >
    >

    No, the smartest thing would be for you to go and do the tutorials at,
    http://htmldog.com
    --
    Regards Chad. http://freewebdesignonline.org
    Chaddy2222, Mar 24, 2009
    #13
  14. PHPBABY3 wrote:

    > On Mar 1, 5:51 pm, "Jukka K. Korpela" <> wrote:
    >> PHPBABY3 wrote:
    >>> <form action="DUDESAMPLE.php" method="post">
    >>> File:<INPUT TYPE="FILE" NAME="uploadfile"
    >>> VALUE="ABC"></input></form>

    >>
    >> There are gross errors.

    >
    > Then wouldn't the smart thing to do be to give the minimal HTML that
    > works correctly (instead of wasting time harping on how bad the HTML
    > is)?


    No, the smart thing for you is to learn the elements of basics of HTML.

    Please do not start using your real name and please do not stop fullquoting
    down to the sig before you have got a clue. Thank you in advance.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Mar 24, 2009
    #14
    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. Matthew
    Replies:
    7
    Views:
    665
    Priscilla Walmsley
    Jan 7, 2005
  2. Replies:
    11
    Views:
    612
  3. Replies:
    8
    Views:
    336
    Remi Villatel
    Jun 13, 2006
  4. robert maas, see http://tinyurl.com/uh3t

    What's wrong with this HTML (fails validation) ?

    robert maas, see http://tinyurl.com/uh3t, Feb 12, 2007, in forum: HTML
    Replies:
    87
    Views:
    1,929
    robert maas, see http://tinyurl.com/uh3t
    Mar 10, 2007
  5. Adam Akhtar
    Replies:
    9
    Views:
    520
    Florian Gilcher
    Aug 16, 2008
Loading...

Share This Page