<form action="do_upload.php" method="post" enctype="multipart/form-data"></form>
<p><strong>File to upload</strong></p>
<p><input name="img1" type="file" size="30" /></p>
<p><input name="submit" type="submit" value="Upolad File" /></p>
до
<form action="do_upload.php" method="post" enctype="multipart/form-data">
<p><strong>File to upload</strong></p>
<p><input name="img1" type="file" size="30" /></p>
<p><input name="submit" type="submit" value="Upolad File" /></p>
</form>
и
if ($_FILES[img1] != "" {
до
if (isset($_FILES['img1'])) {