Hello, If anyone could help with this i will be in your debt. I have this form to upload some photo on the server. <?php echo 'Profile photo (select the file and press upload)'; echo '<form action="" method="post" enctype="multipart/form-data" name="uploader" id="uploader">'; echo '<input type="file" name="file" size="50" required><input name="_upl" type="submit" id="_upl" value="Upload"></form>'; $types = array('image/jpeg', 'image/gif','image/png'); echo '<br />'; echo 'Face photo (select the file and press upload)'; echo '<form action="" method="post" enctype="multipart/form-data" name="uploader" id="uploader">'; echo '<input type="file" name="file" size="50" required><input name="_upl" type="submit" id="_upl" value="Upload"></form>'; $types = array('image/jpeg', 'image/gif','image/png'); if (in_array($_FILES['file']['type'], $types)) { if ($_POST['_upl'] == "Upload") { if (@copy($_FILES['file']['tmp_name'], $_FILES['file']['name'])) { echo '<FONT Size="+1" color="green"></font>'; } else { echo 'Upload Fail.'; } } } else { if ($_FILES['file']) { echo '<FONT Size="+1" color="red">This extension is not allowed , please upload only .jpg .png .gif files.</font>'; } } ?> I get this error " Notice: Undefined index: file in "on the following lines: if (in_array($_FILES['file']['type'], $types)) { and here: if ($_FILES['file']) { what do i do wrong?