Hello,
I have a module with a function which makes a form with a file element:

$form .= form_file(t('Attach'), "filename", 50);
$form .= form_hidden ("form_field_referer", $_SERVER[HTTP_REFERER]);
$form .= form_submit (t("Send Message"), "op", $edit['op'] );
$output .= theme("box", $title, $message . form($form, "post"));
return $output;

Then in another function I try to read the file info but i does't work!!!
$fileatt = $_FILES["edit"]["filename"]["tmp_name"];
$fileatt_type = $_FILES["edit"]["filename"]["type"];
$fileatt_name = $_FILES["edit"]["filename"]["name"];

What do I'm doing wrong? Please, I've been reading a lot about this but I can't find the solution!!

Thanks.