The official way to do this would be using the "accept" attribute: accept = content-type-list [CI] This attribute specifies a comma-separated list of content types that a server processing this form will handle correctly. User agents may use this information to filter out non-conforming files when prompting a user to select files to be sent to the server (cf. the INPUT element when type="file").
For example, <INPUT TYPE=\"FILE\" NAME=\"UPLOAD_FOTO\" SIZE=\"40\" ACCEPT=\"image/jpeg\"> Unfortunately this is usually unreliably implemented in user agents, so you should find a different solution as suggested by others. Bogdan Danielle van Gladbach 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. > > Thanks, > Danielle > > -- > 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]