Posted by Kimmo Laine on 04/06/06 09:34
"chris" <cfeldmann@gmail.com> wrote in message
news:1144300219.617480.30110@j33g2000cwa.googlegroups.com...
> Can someone else see immediately why this script:
>
> <html>
> <body>
> <?php
> error_reporting(~E_ALL);
> print_r($_FILES);
>
> print_r($_POST);
>
> print_r($_REQUEST);
>
> ?>
> <form name="form" action="<?php echo $_SERVER['PHP_SELF'] .
> '?processed=1'; ?>" method="post">
> <input type="hidden" name="MAX_FILE_SIZE" value="5000000"/>
> <input type="file" enctype="multipart/form-data" name="thefile"/>
> <input type="submit"/>
> </form>
> </body>
> </html>
>
>
The enctype="multipart/form-data" is supposed to be an attribute of the
form, not the file field.
Like so:
<form name="form" action="<?php echo $_SERVER['PHP_SELF'] .
'?processed=1'; ?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="5000000"/>
<input type="file" name="thefile"/>
<input type="submit"/>
</form>
--
"ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
Navigation:
[Reply to this message]
|