File uploader sometimes fails

I have created my own php file uploader. It is working fine with image files, so far tested with jpg and png.

I am trying to upload zip or rar files which is where the problem occurs. I have successfully uploaded a rar file (1.5mb in size) but when I try to upload either rar of zip of 9mb the php script fails throwing the following error:

Notice: Undefined index: file in C:\wamp\www\dac\game\game_downloads.php on line 35

That line in my code is the following:

if($_FILES[‘file’][‘error’] === UPLOAD_ERR_OK) {

Both the MAX_FILE_SIZE in the form and in the php ini file are set to 10mb.

I have tried may google searches but havent found anything that fixes my problem.

I haven’t added my entire script as it is a bit messy and I am unsure how it can help, but if needed I am happy to added it.

Can anyone see where I am going wrong?