[thelist] how to tell if a file has been submitted for upload?

Dunstan Orchard dunstan at 1976design.com
Tue Oct 1 15:59:01 CDT 2002

Hello _again_,

I have a form which contains a file upload input.
I'm wondering how I tell (in php) if that file upload bit has an entry in it
on submission?

I wanted to do this:

if (!($small_image_upload == 0))
	// small image data
	$small_imagehw = GetImageSize($small_image_upload);
	$small_width = $small_imagehw[0];
	$small_height = $small_imagehw[1];
	$small_upload_request = "1";

but it didn't register if a file _had_ been submitted for upload.

can anyone tell me the bit of logic that would do this?

thanks very much - dunstan

p.s. and I can't check this with JS at submission because it's optional

Dorset, England

More information about the thelist mailing list