500000) { // echoln( "Sorry, your file is too large."); // $uploadOk = 0; // } // Check if $uploadOk is set to 0 by an error if ($uploadOk == 0) { echoln( "Sorry, your file was not uploaded."); // if everything is ok, try to upload file } else { if (move_uploaded_file($file["tmp_name"], $target_file)) { //echoln( "The file ". htmlspecialchars( basename( $file["name"])). " has been uploaded."); $uploadOk = 1; } else { $uploadOk = 0; echoln( "Sorry, there was an error uploading your file."); } } return array($uploadOk, $target_file); } ?>