
04-25-2008, 10:28 PM
|
 | General & Forum Moderator | | Join Date: Oct 2005 Location: Italy
Posts: 9,031
| |
Re: How to upload a file using a form | | You need to use a code like
$upload_Name1 = $_FILES[$file_key]['name'];
$upload_Name = $prefix.str_replace(" ", "_", $upload_Name1);
$upload_Size = ($_FILES[$file_key]['size']);
$upload_Temp = ($_FILES[$file_key]['tmp_name']);
$upload_Type = ($_FILES[$file_key]['type']);
if($upload_Type != "image/gif" AND $upload_Type != "image/pjpeg" AND $upload_Type != "image/jpeg" AND $upload_Type != "image/png" AND $upload_Type != "image/tiff" AND $upload_Type != "image/bmp"){
$error1 = "$file_key file type is '$upload_Type' which is not allowed! \n";
// Add here a "include" command to include an error page
}
__________________
Navaldesign Logger Lite: Low Cost, Customizable, multifeatured Login script Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more.... Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA! |