deansaddigh Posted February 2, 2010 Share Posted February 2, 2010 I have a form, where admin can upload a school and its details, simple right? On this form i want the user to be able to upload multiple images of a school. Then when the form submits i want the image locations to be sent to the linker table image_school, which holds the school id and the image id. Can anyone shed any light on how to do this please Link to comment https://forums.phpfreaks.com/topic/190713-can-anyone-point-me-in-the-right-direction-for-multiple-image-uploads/ Share on other sites More sharing options...
lemmin Posted February 2, 2010 Share Posted February 2, 2010 The "input type=file" only accepts one file as an input, but you can get around this by including multiple file inputs in your form. You might even be able to accept a directory from the user and then enumerate their local files with javascript. Once you have the form submitted to your php, you can access information about the files with the $_FILES array. I typed "php upload file" into google and found this tutorial as the first result: http://www.tizag.com/phpT/fileupload.php As for the database, that is simple once you have the file information. I don't know what type of database you are using, but you can find a tutorial on that just as easily. Good luck! Link to comment https://forums.phpfreaks.com/topic/190713-can-anyone-point-me-in-the-right-direction-for-multiple-image-uploads/#findComment-1005763 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.