23.03.2012, 02:47
Add enctype="multipart/form-data" to your <form>.
I want to check the image size, then it should be save.
Are you blind :P ? He is clearly using POST method.
I want to check the image size, then it should be save.
PHP код:
list($width, $height, $type, $attr) = getimagesize($_FILES['pic_name']['tmp_name']);
if ($width > 125 || $height > 125)
{
echo "Maximum width and height exceeded. Please upload images below 125 x 125 px size";
exit();
}
// Check file extension then save the file.