Hi Wilmar, Check whether you have something similar:
<form action="auth-x.php" method="post" enctype="multipart/form-data"> You'll definetly need that for antything other than text/plain ones.. Here's a some code that works for me (uploading jpgs): if ($_FILES["pix"]["size"] > 0){ if ($_FILES["pix"]["type"] == "image/jpeg"){ $pix_file = $_FILES["pix"]["name"]; $pix_temp_file = $_FILES["pix"]["tmp_name"]; $new_pix_file = "new_name.jpg"; if(is_uploaded_file($pix_temp_file)){ move_uploaded_file($pix_temp_file, "pix/$new_pix_file"); } } } Hth, Andre On Monday 02 December 2002 11:41 am, Wilmar Perez wrote: > Hello guys > > I'm trying to do a simple task: upload files. However, when I try to > upload files other than text/plain ones I get an empty $_FILES array. Is > there anything I've got to modify in my php.ini file? I'm just following > the expample in the php manual, the only thing different is that I process > the upload task with a function: > > function upload_file($_POST, $_FILES) > { > //The same code as in the php manual > return true; //If everything went ok > } > > if (upload_file($_POST, $_FILES)) > echo "The file has been uploaded"; > else > echo "Sorry, try again"; > > > It works fine with text/plain files, so, am I overlooking anything here? > > Thanks a lot > > ******************************************************* > Wilmar Pérez > Network Administrator > Library System > Tel: ++57(4)2105962 > University of Antioquia > Medellín - Colombia > 2002 > ******************************************************* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php