file - Multiple image upload php code -


I have a script that is uploading images and making thumbnails, but I want to upload several pictures Make and create thumbnails for each of them.

I think I have a problem here:

  if (isset ($ _ files ['image'])) {$ myImage = new_image; $ MyImage- & gt; Upload = 'upload /'; $ Res = $ myImage-> Upload ($ _ files ['image']); If ($ res) {// RESIZE // $ myImage- & gt; Pad Collar = '# 222222'; $ MyImage- & gt; NewWed = 400; $ MyImage- & gt; Newhigh = 300; $ I = $ myImage-> Resize (); Echo $ i; }} And {? & Gt; & Lt; Form action = "" method = "post" enctype = "multipart / form-data" name = "form1" id = "form1" & gt; & Lt; P & gt; & Lt; Input type = "file" name = "image" id = "picture" /> & Lt; / P & gt; & Lt; P & gt; & Lt; Input type = "submit" name = "button" id = "button" value = "submit" /> & Lt; / P & gt; & Lt; / Form & gt;  

I know that the input should be changed in many fields, but I need a loop to make it first.

I think I've found what you are looking for. It provides and uses PHP &

  & lt; Input type = "file" name = "image" id = "image" /  

& gt;

.. In

  & lt; Input type = "file" name = "image []" id = "image" />  

The advantage of the image [] is that they will be stored and distributed as an array.

Such ..

  & lt; Input type = "file" name = "image []" id = "image" /> & Lt; Input type = "file" name = "image []" id = "image" /> & Lt; Input type = "file" name = "image []" id = "image" />  

.. will change in something like this:

  array (0 => IMG1, 1 => IMG2, 2 = & Gt;.).  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -