Why do you do everything different then I suggest, and then complain it doesn't worK? You swapped :
$fileName = $value[name];
$fileType = $value[type];
$fileSize = $value[size];
$fileContent = $value[content];
$fp = fopen($value[tmpName], 'r');
$content = fread($fp, $fileSize);
$content = addslashes($content);
fclose($fp);
for:
$fp = fopen($tmpName, 'r');
$content = fread($fp, $fileSize);
$content = addslashes($content);
fclose($fp);
// Set variables
$fileName = $value[name];
$fileType = $value[type];
$fileSize = $value[size];
$fileContent = $value[content];
And yues. It does make a difference.
Also. I suggested to look at the manual, which is located at php.net.
Look at: fread , foreach .
All you need is in the file & the manual. I am not going to spell it out. THe idea is that next time you encounter these issues, that you can solve them yourself.
J.