File Upload Headaches

From: Date: Thu, 19 Jul 2001 06:36:27 +0000
Subject: File Upload Headaches
Groups: php.general 
Request: Send a blank email to php-general+get-58612@lists.php.net to get a copy of this message
Hi all, Can anybody see what is wrong with this code ?? echo "\$userfile = $userfile"; echo $HTTP_POST_FILES['userfile']['tmp_name']; // now to provide an assignment submission box print "<P>"; print "<FORM ENC_TYPE=\"multipart/form-data\" ACTION=\"$param&upload=true\" METHOD=\"post\" >\n"; print "<INPUT TYPE=\"hidden\" NAME=\"MAX_FILE_SIZE\" VALUE=\"1048576\">\n"; print "<H4>Submit A File</H4><P> "; print "<INPUT TYPE=\"file\" NAME=\"userfile\" >\n<P>"; print "<INPUT TYPE=\"submit\" VALUE=\"Upload\">\n"; print "</FORM>"; this is just a code fragment but, essentially the form submits back to itself. When i try to output the $HTTP_POST_FILE['userfile']['any thing'] variables they are not set, and $userfile is simply set to the filename on the other computer. Any ideas about what an earth i'm doing wrong ???? Jason

« previous php.general (#58612) next »