Thanks - geting an invalid file name error. I am actually at the end of the page then trying to place this image with others in a mysql database. here's the code snippet:
$src=ImageCreateFromJpeg($FILES["image"]["tmp_name"][0]);
$swidth=ImageSx($src);
$sheight=ImageSy($src);
$dwidth=100;
$dheight=100;
$dst=ImageCreate($dwidth,$dheight);
ImageCopyResized($dst,$src,0,0,0,0,$dwidth,$dheight,$swidth,$sheight);
ImageJpeg($dst,$createdthumb);
ImageDestroy($src);
ImageDestroy($dst);
$file = fopen($_FILES["$createdthumb"]["tmp_name"], "r");
$createdthumb =
fread($file, $createdthumb["size"]);
// Escape special charcters in the file
$createdthumb = AddSlashes($createdthumb);
$visible=1;
$security=100;
$insertQuery = "INSERT INTO remains VALUES (NULL, " .
"\"" . $title . "\", " .
"\"" . $description . "\", " .
"\"" . $price . "\", " .
"\"" . $ship . "\", " .
"\"" . $fileContents[0] . "\" , " .
"\"" . $fileContents[1] . "\" , " .
"\"" . $fileContents[2] . "\" , " .
// "\"" . $fileContents[3] . "\" , " .
"\"" . $createdthumb . "\" , " .
"\"" . $category . "\", " .
"\"" . $legacy_id . "\", " .
"\"" . $visible . "\", " .
"\"" . $security . "\")";