Here is my teaching sample that shows how to upload a file or three. Please read it over - code, comments and especially the man page references (VERY important to read the manual about file uploads) and then post back here with any specific questions.

If this design pattern works for you, you're probably getting the problem from the jQuery side of things.

One other comment I might add,... the whole concept of HTTP file uploads was invented when a file of 800K was considered gigantic. Today, you can hardly take a photo with a cell phone that is not a multiple of that size. In other words, HTTP may not be the best technology for dealing with large file uploads. You might want to consider using FTP instead. I get away with using HTTP for most digital photos, but my clients are using cameras that generate 1 to 2 MB images.

Those values look OK. But have a look at line 11 of the code snippet. It limits the largest file upload to 300K (about 1,000 times smaller than your default value). When I set a limit of 8192000, that gives me about 8MB. Suggest you raise this value to a much larger number.

The other thing I see here, and something I have never seen before, are two INPUT TYPE=FILE statements in the same form. You might want to use var_dump() to see what is coming into your action script in the $_FILES array. One of the INPUT TYPE=FILE statements is before the MAX_FILE_SIZE statement. This seems to violate the rules documented on the PHP.net web site (but as I said, I have never seen such a thing in practice).

The reazon about why I had two INPUT TYPE=FILE statement in the same form is beacause this page is the news section of www.itssc.edu.mx, the first statement is for the main photo of the article, and the second statement is optional, and it is If the user want to add a gallery to the article, this second statement is an array and use it with "jquery.multifile" script.

I change the value of MAX_FILE_SIZE to 16192000, and also I change the values for uploads in all ini files related with php in the wamp server but the files cant be uploaded to localhost.

I think that something is missing maybe in my local server (wamp) because nomather what changes I made if I use the same code with big files nothing is uploated, but with tinny files all images are uploaded to localhost.

One way to do what you need is to "echo" every "<input ...>" that you generete for the form... for instance, using htmlentities to avoit the HTML tags behavior of hidden itselves, since is too much easier to find in the browser screen (whit the find tool) than into te generated code.

Featured Post

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption. Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…