The Php part that is to check & upload the images is:
if (isset($_POST['submit_foto'])) {
if (eregi('^image/p?jpeg(;.*)?$', $_FILES['uploadedfile']['type'])) {
$filetype = 'jpg';
} else if (eregi('^image/gif(;.*)?$', $_FILES['uploadedfile']['type'])) {
$filetype = 'gif';
} else {
$error = 'Thumb-nail photo has the wrong file type. Acceptable image formats are either gif or jpg.';
array_push($error_list, $error);
}//CLOSES if (eregi...........
echo 'File Type: ' . $_FILES['uploadedfile']['type'] . '<p>';
and I am getting error message that File type is not “either gif or jpg” and when I check it via the echo command I see
that the $_FILES[‘uploadedfile’][‘type’] is empty!
What is going on?
What am I missing?
ThanX,
P.S., I may have posted this message before in a wrong thread, if so please ignore that and reply here.
Your code should analyse this number before trying to do anything, if it is not 0 - something has gone wrong, and you could consider feeding that back to the user - or logging it somewhere.
No the issue is not the MAX_FILE_SIZE, since I have increased that ti much higher and still same strange Error!
Also of course is not that since the Error is happening before that as per the Error message that the File_type is missing.
So as per your and cups suggestion I have printed out the var_dump($_FILES) which you can see below.
I fixed the problem.
FYI, the problem was I was not loading the data for MAX_FILE_SIZE via the Php code that I had to do so for the rest of
the page and somehow I was missing that omission!