Hello
I use Apache/1.3.26 on Windows 2000 (yes I know! :-). PHP's version is 4.2.1.
I would like to have a page where I can upload some files. I wrote the php-script and I think it should work, but it does not!
It seems that the variable "submitted" is never true or that the server screws something up and never gets the uploaded file.
I never see the stats of the uploaded file (name, type size).
Here is my code:
if ($_REQUEST["submitted"]){
echo("Name: ".$userfile_name."<br>\n");
echo("Type: ".$userfile_type."<br>\n");
echo("Size: ".$userfile_size."<br>\n");
}
else{
echo("<FORM ENCTYPE=\"multipart/form-data\" ACTION=\"$PHP_SELF\" method=\"post\">\n");
echo("<INPUT TYPE=\"hidden\" NAME=\"MAX_FILE_SIZE\" value=\"10000\">\n");
echo("<INPUT TYPE=\"file\" NAME=\"userfile\">\n");
echo("<INPUT TYPE=\"hidden\" NAME=\"submitted\" value=\"TRUE\">\n");
echo("<INPUT TYPE=\"submit\" NAME=\"action\" VALUE=\"upload\">\n");
echo("</form>");
}
Do you guys have any idea whats wrong here? Or is that a bug in the Apache or PHP version for Windows?
I also tried some other php snippets. None of them works!
Thanks in advance!
Jan