getimagesize
| From: | Sebastian | Date: | Tue, 01 Apr 2003 23:21:42 +0000 |
| Subject: | getimagesize | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-141893@lists.php.net to get a copy of this message | ||
little problem with getimagesize function. I have a form upload and want the
images resized only if greater than 1024, if greater than 1024 then i want
it to resized, the problem is i do not know if getimagesize is getting the
form data:
<FORM action="" encType="multipart/form-data" method="post"
name="sendform">
<INPUT name=MAX_FILE_SIZE type=hidden value=10000000>
<INPUT maxLength=128 name=image type=file ACCEPT="image/jpeg, image/jpg">
<INPUT name=Submit type=submit value=Submit>
<INPUT name=Reset type=reset value=Reset>
// some if's .......
$imagewidth = getimagesize($form_data);
if($imagewidth[0] >= "1024") {
$img_width = "1024";
} else {
$img_width = "*";
}
// rest of the script to resize.......
so an i doing it the proper way of getting $form_data?
cheers,
- Sebastian