Use the following code (it is a modification of my own code; use it instead of that code):



<?
if(!isset($_FILES['userfile'])) exit;

$maxsize = 100000;
$uploadDir = "upload/";
$fsize =...