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? Quote 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 Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/69855-pic-upload-topics/#findComment-350969 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.