cooldude832 Posted June 9, 2007 Share Posted June 9, 2007 I have a file upload this is the form inputs: <form name='ad' action='ad_preview1.php' id=\"adimg\" method='post' enctype='multipart/form-data'> <input type="file" name="imagefile0" id="imagefile0" /><br/> <input type="file" name="imagefile0" id="imagefile1" /><br/> <input type="file" name="imagefile0" id="imagefile2" /><br/> <input type="file" name="imagefile0" id="imagefile3" /><br/> and this code is not functioning right: if ($HTTP_POST_FILES['imagefile'.$i]['type'] == "image/jpeg" || $HTTP_POST_FILES['imagefile'.$i]['type'] == "image/jpg" || $HTTP_POST_FILES['imagefile'.$i]['type'] == "image/pjpeg" || $HTTP_POST_FILES['imagefile'.$i]['type'] == "image/pjpg") {//Do something} Link to comment https://forums.phpfreaks.com/topic/54898-file-upload-giving-me-trouble/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.