RE: [PHP] File Uploading Security - Urgent please

2001-01-11 Thread Matt Williams
if(ereg("jpg|jpeg|gif$",$userfile_name)) { do something } else { this file is not allowed } This will check that the uploaded file has the correct extension. Where $userfile is the upload field name in the form M@ > -Original Message- > From: Statbat [mailto:[EMAIL PROTE

RE: [PHP] File Uploading Security - Urgent please

2001-01-11 Thread Moritz Petersen
$userfile_type contains the MIME-type of the file. This is maybe more relieable then just the extension... Mo. > if(ereg("jpg|jpeg|gif$",$userfile_name)) > { > do something > } > else > { > this file is not allowed > } > This will check that the uploaded file has the correct extensi

Re: [PHP] File Uploading Security - Urgent please

2001-01-11 Thread Alex Black
http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Matt Williams") > Newsgroups: php.general > Date: 11 Jan 2001 03:11:21 -0800 > Subject: RE: [PHP] File Uploading Security - Ur