if ($imagetype != "image/jpeg"){ $error = "Image is not a JPEG"; } if ($imagesize >= 5242880) { $error = "Image exceeds the max file size - Max= 1.5 MB"; }
if ($error == "") {
move_uploaded_file($source, $target);
$imagepath ="Uploads/".$imagename; $save = "Uploads/thumbs/".$imagename; //This is the new file you saving $file = $imagepath; //This is the original file