scheols Posted July 15, 2006 Share Posted July 15, 2006 Alright I want 2 make my script stop if they dont contain the file types i provide.here are the file types:$file_type = array("js","gif","jpg","txt","png","jpeg","bmp");heres my code:[code]<?php$name = $_FILES['userfile']['name'];if(!(copy($_FILES['userfile']['tmp_name'], "images/" . $_FILES['userfile']['name']))) die("Cannot upload files.");echo "Upload Complete!<br>";echo "<a href='"."http://xizionz.vectoredhost.com/images/"."$name"."'>"."Here"."</a>";?>[/code] Link to comment https://forums.phpfreaks.com/topic/14653-file-upload-problemkinda-xd/ Share on other sites More sharing options...
BillyBoB Posted July 15, 2006 Share Posted July 15, 2006 whats the error Link to comment https://forums.phpfreaks.com/topic/14653-file-upload-problemkinda-xd/#findComment-58401 Share on other sites More sharing options...
scheols Posted July 15, 2006 Author Share Posted July 15, 2006 thiers no error but i just cant seem 2 check if the file types are right when adding that part i have even if the file type is correct Link to comment https://forums.phpfreaks.com/topic/14653-file-upload-problemkinda-xd/#findComment-58403 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.