shamsuljewel Posted September 19, 2007 Share Posted September 19, 2007 We can restrict uploading picture if (($_FILES["userfile"]["type"] == "image/gif") || ($_FILES["userfile"]["type"] == "image/jpeg") && ($_FILES["userfile"]["size"] < 4000)) { } else { } But how I restrict the width and height restriction? Link to comment https://forums.phpfreaks.com/topic/69855-pic-upload-topics/ Share on other sites More sharing options...
JJohnsenDK Posted September 19, 2007 Share Posted September 19, 2007 use the getimagesize() function http://dk2.php.net/manual/da/function.getimagesize.php This gives you the dimensions of the image Link to comment https://forums.phpfreaks.com/topic/69855-pic-upload-topics/#findComment-350933 Share on other sites More sharing options...
shamsuljewel Posted September 19, 2007 Author Share Posted September 19, 2007 thanks Link to comment https://forums.phpfreaks.com/topic/69855-pic-upload-topics/#findComment-350969 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.