Stijn Goris wrote:[color=blue]
>
> hi all,
>
> A user can upload maximum 10 image files at once.
> When the user only uploads 6 images, 4 fileboxes are left blank. I use
> function checkImage() //check the the extension. Must be a jpeg
> {
> $bool = 0;
>
> $this->type = $_FILES['imagefile']['type'][$this->index];
> if ($this->type == "image/pjpeg" || $this->type == "image/jpg")
> {
> $bool = 1;
> }
> else
> {
> $bool = 0;
> $this->errorMessage .= "- Not an image ($this->type). Image has to be a
> jpeg<br>";
> }
> return $bool;
> }
>
> to test the image.
> I go from 0 -> 10. When it comes along a blank imagebox the function doesn't
> return anything. Someone knwos why. Is there a better way to check for a
> blank filebox that is send?[/color]
Check the comment from "zilinex at linuxmail dot org" at:
http://ca3.php.net/features.file-upload
(I haven't tried it)
Shawn
--
Shawn Wilson
shawn@glassgiant.com http://www.glassgiant.com