Hi, problem sorted.
Firstly, yes I do have permission to upload files but I can't run phpinfo(), the hosting company has dissabled it for security reasons.
The page, which as I said is quite large, accesses a flat textfile database and displays the information about a group of companies.
The data can be displayed in one of 3 formats:
1) A simple list/table with 3 columns,
2) A more detailed list with all the database record info deplayed for editting
3) A new blank record ready for inputting data for a new entry.
When the page first loads it diplays the info in format 1)
The user can then select to edit a record - format 2) or input a new record - format 3). When format 3 is used there is a field to upload an image file - which is why I added the 'enctype=multipart/form-data' attribute.
So I changed the form definition to:
<FORM METHOD="POST" ACTION="<?=($PHP_SELF)?>" NAME="press" <?if ($brandNew == "yes"){echo "ENCTYPE='multipart/form-data'";} ?>>
where $brandNew is a new variable to define if a new record is being added. In this case the field for the image file is then also part of the form definition. I've also added a hidden field <INPUT TYPE='hidden' NAME='MAX_FILE_SIZE' VALUE='20000'> that is only present when the image upload field is present.
It would appear that if the "ENCTYPE='multipart/form-data" attribute is added to the form tag then the file upload field also has to be present - not sure about the MAX_FILE_SIZE.