Ive found the root of my problem but not solved it.
I am able to upload fwrite data then redirect to photos upload, but the problem with that is if the $product name is omitted or different the fwrite & photos are not together, and that is unsatisfactory. I would prefer to have both in the same operation but that is impossible. The root of that problem is in the view page where the fwrite requires the first coding & the photo upload requires the second, and they are not interchangeable.
PHP Code:
<?php echo form_open('pagename'); ?>
<?php echo form_open_multipart('pagename'); ?>
If the $product variable in the fwrite can be transferred to the photos upload, then that could be lived with, but redirect to the finished advert will be required.
I would prefer when the photos are uploaded then to redirect to the finished advert, but that is impossible because the photos upload will not redirect. Although I have another operation with a small amount of fwrite plus a pdf document upload and that redirects with no problem.
I have spent the last 4 months trying to resolve this issue, probably spent 1,000 hours plus, and still havent achieved a resolution.
By the way the coding in the UserGuide detailing uploads is faulty, by undefined variables, but when those variables are deleted it works but not with a combination of fwrite & photo uploads.
The problem appears to be a fault within CodeIgniter, so there needs to be someone who understands their coding & be able to fix the problem.