if (isset($_FILES['image'])) { $filename = $_FILES['image']['tmp_name']; list($width, $height) = getimagesize($filename); echo $width; echo $height; }