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

Paul Bennett paul at teltest.com
Tue Oct 1 16:12:01 CDT 2002


if($small_image_upload == "none")
    {
    // there is no image uploaded
    }
else
    {
    // there is
    }

Dunstan Orchard wrote:

>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
>http://www.1976design.com/
>http://www.orchard.it/
>http://www.maccaws.org/
>
>

--
Paul Bennett
Internet Developer
Teltest Electronic Design
--------------------------
Phone : 64 4 237 0767
Web : http://www.teltest.com
Wap : http://wap.teltest.com
Email : paul at teltest.com
--------------------------






More information about the thelist mailing list