ok what i am trying to do is get an array of filetypes to work with this upload script
sofar only gif works
<?
if(isset( $Submit ))
{
//If the Submitbutton was pressed do:
if ($_FILES['imagefile']['type'] == 'image/jpg'){
copy ($FILES['imagefile']['tmp_name'], "files/".$FILES['imagefile']['name'])
or die ("Could not copy");
echo "";
echo "Name: ".$FILES['imagefile']['name']."";
echo "Size: ".$FILES['imagefile']['size']."";
echo "Type: ".$_FILES['imagefile']['type']."";
echo "Copy Done....";
}
else {
echo "";
echo "Could Not Copy, Wrong Filetype (".$_FILES['imagefile']['name'].")";
}
}
?>
heres what i tried
$filesarray=array('blah','blah','blah');
then
if ($_FILES['imagefile']['type'] == $filesarray){
and it told me all filetypes were wrong
can somebody help me get an array working