TimUSA Posted January 20, 2008 Share Posted January 20, 2008 How do I change this so that it supports jpg, jpeg, bmp echo' <form name="form1" method="post" action="'.$scripturl.'?page=181'.$GET['page'].'" enctype="multipart/form-data"> <input type="file" name="imagefile"> <br> <input type="submit" name="Upload" value="Upload"> </form>'; if(isset($_POST['Upload'] )) { if ($_FILES['imagefile']['type'] == "image/png") { copy ($_FILES['imagefile']['tmp_name'], "screenshots/".$_FILES['imagefile']['name']) or die ("Could not copy"); Quote Link to comment https://forums.phpfreaks.com/topic/86870-image-upload-to-support-multiple-file-types/ Share on other sites More sharing options...
revraz Posted January 20, 2008 Share Posted January 20, 2008 Use || (or) and add the filetypes to your IF statement. Quote Link to comment https://forums.phpfreaks.com/topic/86870-image-upload-to-support-multiple-file-types/#findComment-444094 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.