Jump to content

PHP Upload


Daney11

Recommended Posts

Hey guys,

 

Im having a problem with upload modify.

 

Im using

 

<input type="hidden" name="MAX_FILE_SIZE" value="300000"><input name="file" type="file" />

 

if(empty($_POST['file'])) {
$file_name = 'NULL';
} else {
$_POST['file'] = FALSE;
$errors[] = 'Wrong File Type';
}

if(!in_array($ext,$allowed_filetypes, $_POST['file'])){
   $errors[] = 'Please Make Sure Your File Is Below 512kb In Size and is in .gif Format';
            }

if (empty($errors)) {

move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile);

 

The file upload works when i add news and im using the same values in everything on news_modify but i get the error wrong file type. and when i var_dump post file i get the file name..

 

Any ideas? this is strange.

Link to comment
https://forums.phpfreaks.com/topic/93708-php-upload/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.