I have a form where I\'m posting different fields and every type of field posted seems to work except the input File type.
I\'m using var_dump($_POST);
Actually if you try Firefox (>13), you can get the posted value. But if you are using Chrome or Safari, you can't get the posted value. I think the it is related with the Browsers.
Files are stored in $_FILES, not $_POST
http://php.net/manual/en/reserved.variables.files.php $_FILES variable
http://www.php.net/manual/en/features.file-upload.php Manual on PHP File Uploads.
To handle the file (no error checking):
$ROOT = "/path/to/store/files";
foreach($_FILES as $file => $details)
{ // Move each file from its temp directory to $ROOT
$temp = $details['tmp_name'];
$target = $details['name'];
move_uploaded_file($temp, $ROOT.'/'.$target);
}
See also http://www.php.net/manual/en/function.move-uploaded-file.php for more examples.