so i think i've read every thread which came up in my searches on this board for the subject, but i still have a problem
i cut down the script to the basics to get other possible errors out of the way, and it still doesn't work.
i can upload the image, get the image size, etc...
but the resizing just fails time after time, and i especially get this output
Resource id #3
i'm not sure what to do with this. i've searched for this error (?), without results.
here's my full code.
if($action == "new") {
$uploaddir = './images/upload/';
$imagename = $_FILES['cover']['name'];
$temp_picture = $_FILES['cover']['tmp_name'];
$uploaded_picture = $uploaddir . $imagename ; //full path
$imagesize = getimagesize($uploaded_picture);
$width = $imagesize[0]; //oude breedte -- height is de eerste waarde van de array die getimagesize als uitkomst geeft
$height = $imagesize[1]; //oude hoogte
$maxwidth = 100; //nieuwe breedte
$maxheight = 100; //nieuwe hoogte
$cover = imagecreatetruecolor($maxwidth, $maxheight);
$oldcover = imagecreatefromjpeg($uploaded_picture);
imagecopyresampled ($cover, $oldcover, 0,0,0,0, $maxwidth, $maxheight,
$width, $height);
imagejpeg($cover, $temp_picture);
//if (move_uploaded_file($temp_picture, $uploaded_picture)) {
$insertQuery = "INSERT INTO mash_cms (id,input_date, band, title, format, label, url, review, reviewer, cover, online) VALUES ('$id','$input_date','$band','$title','$format','$label','$url','$review','$reviewer','$cover','
$online')";
//}
// de gegevens in de database steken
$results = mysql_query( $insertQuery );
// als de gegevens in de database zijn gestoken
if($results){
echo( "your review was succesfully uploaded." );
echo ("<br><br>");
echo "band:.".$band."<br>title:".$title."<br><img
src='".$cover."'><br>";
echo ("<a href='cms_index.php?p=1&action=new' target='_self'>want to upload another review ?</a>");
}
else{
die( "Trouble Saved: " . mysql_error() );
}
}
thanx in advance!