Skip to content
Advertisement

Tag: file-upload

PHP Upload Multiple Images through Loop

I am trying to upload multiple images in a loop but for some reason it will create the directory, upload 1 file and create the MySQL record so I’m not sure why it only uploads 1 file even though when i’ve printed $i to see how many files have been counted it always counts the correct amount. PHP HTML I’ve

PHP image upload – several errors

So, I’m trying to upload an image using move_uploaded_file(). Here is the code: HTML FORM: PHP SCRIPT: But I’m getting lot of warnings: Can someone please help me with that? Answer # Array to string conversion This warning is in insert function: you passed array ($_FILES[‘fileImage’]) instead of string. It seems that you want to store address of image, if

Uploading PDFs to a directory PHP

I’m uploading PDFs to a directory and my script works fine for one directory but I’m having troubles coming up with a way to write the script efficiently when I have more then one directory to upload PDFs on a page. I know of a few ways I can do it, like write another function like below but there must

Advertisement