Let me first talk about the function I want to implement, that is, uploading many images at the same time, and each image has its corresponding page number. Then I want to save the image url and page number in the database. The main problem is how to pass the page number corresponding to each image. I uploaded it using a form, and each time...
Let me first talk about the function I want to implement, that is, uploading many images at the same time, and each image has its corresponding page number. Then I want to save the image url and page number in the database. The main problem is how to pass the page number corresponding to each image. I used form upload, and the number of images is not fixed during each upload, so I cannot write the form to death. I also thought about how to dynamically Add a form using js, but how can I receive it from the php end. Ask for advice.
My language is php html js (not very familiar)
Reply content:
Let me first talk about the function I want to implement, that is, uploading many images at the same time, and each image has its corresponding page number. Then I want to save the image url and page number in the database. The main problem is how to pass the page number corresponding to each image. I used form upload, and the number of images is not fixed during each upload, so I cannot write the form to death. I also thought about how to dynamically Add a form using js, but how can I receive it from the php end. Ask for advice.
My language is php html js (not very familiar)
When the input is added dynamically, a hidden input is followed dynamically. The final idea is that the number of pages and images can be bound.
I is incremental
You think of each image as an object. The entire form is a collection of objects, linked lists, arrays, or other objects. When an image is added, an automatic upload function is provided, when you import images to the database, it is foreach (List)