What's Wrong with this HTML?

P

PHPBABY3

<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
 
N

nice.guy.nige

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
 
J

Jukka K. Korpela

PHPBABY3 said:
<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
 
P

PHPBABY3

While the city slept,  PHPBABY3 feverishly typed:



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.


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>
 
N

nice.guy.nige

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
 
H

Harlan Messinger

PHPBABY3 said:
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.
 
H

Harlan Messinger

Jukka said:
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?


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.


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.
 
H

Harlan Messinger

Jukka said:
Harlan said:
<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.
 
J

Jukka K. Korpela

Harlan said:
Jukka said:
Harlan said:
<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.)
 
H

Harlan Messinger

Jukka said:
Harlan said:
Jukka said:
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.
 
P

PHPBABY3

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
 
J

Jukka K. Korpela

PHPBABY3 said:
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.
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top