Hey guys, think I've just been staring at this problem too long to find out how simple it is to fix... worked with several methods of finding and saving image dimensions to MySQL (actually used this same method several times), but the MySQL width and height is not populating this time...
... /*capture selected image, set paths, and upload to ftp*/ $image = $_FILES['image']['name']; $target = "../img/"; $target = $target . $image; move_uploaded_file($_FILES['image']['tmp_name'], $target); ... /*Get image dimensions and rescale image*/ list($width, $height) = getimagesize("http://www.something.com/img/obits/".$image); $scale = min((230/$width), (400/$height)); $width1 = ceil($scale*$width); $height1 = ceil($scale*$height); /*Update as needed*/ mysql_query (" INSERT INTO table (date, name ,image, width, height, detail) VALUES('$date','$name ','$image','$width1','$height1','$article') ", $con1) or die(mysql_error());
The image is uploading to the ftp... I've set all correspong folders to 777 permissions. Everything works properly except populating width and height (both end up as zero). I've tried to just use $width and $height instead of $width1 and $height1 (skipping the scaling segment), with no luck. If anyone just happens to notice what I did wrong, any ideas are greatly appreciated.
Edited by PsychicTide