xuniter Posted February 5, 2011 Share Posted February 5, 2011 Hi, i have in my script the following : $pid = mysql_insert_id(); //place image in the folder $newname = "$pid.jpg"; move_uploaded_file($_FILES['fileField']['tmp_name'],"../inventory_images/$newname"); header("location: inventory_list.php"); exit(); but i can't figure out how to upload more than one image. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/226770-how-to-upload-more-than-1-image/ Share on other sites More sharing options...
sottwell Posted February 5, 2011 Share Posted February 5, 2011 Use a foreach loop to loop through the $_FILES array. http://php.net/manual/en/function.move-uploaded-file.php As far as uploading from the front-end form, my preference for multiple uploads is Uploadify. Quote Link to comment https://forums.phpfreaks.com/topic/226770-how-to-upload-more-than-1-image/#findComment-1170195 Share on other sites More sharing options...
xuniter Posted February 6, 2011 Author Share Posted February 6, 2011 thanks, probably will use that upload script! Quote Link to comment https://forums.phpfreaks.com/topic/226770-how-to-upload-more-than-1-image/#findComment-1170716 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.