I am trying to register an array containing file types, htm, jpg, jpeg, gif and pdf. I think I am missing something, if someone could look at this and tell me what I am doing wrong that would be awesome, thanks in advance. jas <?php $types = array(".gif"=>"1", ".jpg"=>"2", ".jpeg"=>"2", ".htm"=>"3", ".pdf"=>"4"); if ($img1_name != "" && eregi('$types', $img1_name)) { @copy("$img1", "/path/to/images/$img1_name") or die ("Could not upload file, please try again after making sure the file is less than 2mb in size and the file name correct"); } else { die("No file selected for upload, or the file was not the correct type. Please only upload .jpg files."); } ?>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php