you could write a bit of JavaScript to run on the form's onSubmit event or 
even the fields onBlur event.  Then in your JavaScript, parse out the file 
name and extension to validate.  It's not 100% accurate since users could 
rename any file to have a JPG extension, but it works for the majority...

At 06:41 PM 1/21/2002 +0200, val petruchek wrote:
> > How can I, using:
> > <INPUT TYPE=\"FILE\" NAME=\"UPLOAD_FOTO\" SIZE=\"40\">
> > specify the file extension.
> > I want the user only to upload *.jpg.
>You can only check $userfile_type to detect the type of uploaded file. You
>can specify nor extension to browse dialog neither default path for
>browsing... Security, you know
>
>
>Valentin Petruchek (aki Zliy Pes)
>http://zliypes.com.ua
>mailto:[EMAIL PROTECTED]
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to