Hello everybody! First post in a while, but this one has me stumped. Last week, the following code worked -
foreach($HTTP_POST_FILES as $fileName=>$fileArray){
if(is_uploaded_file($fileArray['tmp_name'])){
if(($fileArray['type']=="image/gif") || ($fileArray['type']=="image/jpeg")){
move_uploaded_file($fileArray['tmp_name'], "$fileDir/".$fileArray['name']) or die("Couldn't upload file! Sorry!");
$qry="INSERT INTO tblphotos (des, name, cat, link) VALUES ('".addslashes($_POST['des'])."', '".addslashes($fileArray['name'])."', '".addslashes($_POST['cat'])."', '".addslashes($_POST['link'])."')";
$rsInsert = mysql_query($qry, $theatre);
}
}
}
for .jpg, .jpeg, .gif images, which is what I want, obviously. Suddenly this week, it only works with .gif files. Literally no idea why. Anybody?
TIA for any/all help or ideas.