Re: image_type

From: Date: Sun, 03 Apr 2005 21:31:15 +0000
Subject: Re: image_type
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-212131@lists.php.net to get a copy of this message
William Stokes wrote:
I was under impression that php automatically gives values to image_type and
image_name if one tries to upload image from a web form if the name of the
uploaded image field is image.
You mean it automatically gives values to variables $image_type and $image_name ? No, it doesn't. You can get the type (MIME) and the name of the file with $_FILES['filename']['type'] for the MIME-type and $_FILES['filename']['name'] for the filename. I encourage you to take a better look here : http://www.php.net/features.file-upload and you can also print_r/var_dump($_FILES); Hope that helps, -- Josip Dzolonga http://josip.dotgeek.org jdzolonga[at]gmail.com

« previous php.general (#212131) next »