i have updated my imageresize.php to this to correct errors that i had in php
<?php
$filename= $_FILES['userfile']['tmp_name'];
$width = 50;
$height = 50;
#header('Content-type: image/jpeg');
list($width_orig, $height_orig) = getimagesize($filename);
$ratio_orig = $width_orig/$height_orig;
if ($width/$height > $ratio_orig) {
$width = $height*$ratio_orig;
} else {
$height = $width/$ratio_orig;
}
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
$imgData= $image;
?>
if i block the header, it gives no error but doesn't upload the image data into the database, if i unblock the header line, then i get the same error