html form:
<form action="file-upload.php" method="post" enctype="multipart/form-data">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="15000000">
<input type="hidden" name="advisor2" value="oak">
<input type="hidden" name="article2" value="test">
Send these files:<br>
<input name="userfile[]" type="file">
<br>
<input name="userfile[]" type="file">
<br>
<input type="submit" value="Send files" name="submit">
</form>
php code:
for($i=0; $i<2; $i++){
if ($userfile_name[$i]){
if (is_uploaded_file($userfile[$i])) {
copy($userfile[$i], "./$userfile_name[$i]");
if(!$entrega){ $entrega = 1; }
} else {
echo "Possible file upload attack: filename
'$userfile_name[$i]'.";
}
}
}
any ideas? Please, I'm very new in PHP so I need a LOT of constructive
criticism
Jordi
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-INST] abot the weird file upload problems: code
Revista Electr�nica de Visi�n porComputador Fri, 11 May 2001 01:49:23 -0700
