Thanks oscar I'll give this a go, I tried just using filetype != image/jpeg so mabey adding the rest will help , I read there was a problem with some browser with uploading hopfully this will solve the problem. much apprecatied Deadsam
"Oscar F" <[EMAIL PROTECTED]> wrote in message 002001c23684$fc68ba20$bc00a8c0@320jupiter">news:002001c23684$fc68ba20$bc00a8c0@320jupiter... > deadsman, > > if (($filename_type != "image/jpeg") && ($filename_type != "image/jpg") && > ($filename_type != "image/pjpeg")) { > header("Location:submitError.php"); exit; //goes to an error page if the > file wasnt a jpg > } else { > $upload_path = "/path/of/the/$filename_name"; > if (is_uploaded_file($filename)) { > Exec("cp $filename $upload_path"); > } else { > //do whatever if it wasnt uploaded > } > > The "file" formfield, is called filename.. just in case... if you call it > myFile, you'd have to replace $filename with that. > > Hope this helps. > > Oscar.- > > ----- Original Message ----- > From: "Deadsam" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, July 28, 2002 5:53 PM > Subject: [PHP] need help with uploading images > > > > I'm trying to get an uploader to work, where you check to make sure it's a > > jpeg file that's being uploaded, and no other files allowed. the server is > > unix linux using php4.1 > > Any help would be appreciated. > > thanks in advance > > deasdam > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php