I have renewed my computer after some problems with the hard drive – The problem – after reloading the computer with PHP 5, I cannot get html forms to upload images to a folder – in any of my php-based programs. It used to work… before the computer renewal . I have the same version of PHP as before and the same php.ini file. Any idea what could be preventing the $_FILES from working in files that used to work great? I suspect something in the php.ini, but just a feeing… Any thoughts??? David
Yes, the form is right and the permissions are set to 777. When I "submit" the $_FILES['img1'][anything] cannot be found and the image is not loaded to the folder. Before I renewed the computer, it worked fine in every file on every program. Now it does not work on any file on any program which leasd me to think it is something in the system -- .ini, or something else that would affect a form upload. Any thoughts? David
Have you tried with $_FILES['img1']['anything'] instead $_FILES['img1'][anything]? You can try to debug it with error_reporting(E_ALL); and tell us if there are any error or notice after the form process...
thanks for your reply! I have tried placing ["xxxx"] and nothing I have error reporting on and nothing shows when the php is working the form data, I have it set as follows if($_FILES['img1']['size'] > 0)// test the file exists { if(($_FILES['img1']['type'] != "image/pjpeg") AND ($_FILES['img1']['type'] !="image/jpeg") AND ($_FILES['img1']['type'] !="image/jpg")) { $error_message .= "<br /><b>ENTRY ERROR!</b><br /> Images must be .jpg format<br /> <br />*******<br /> Please Enter a .JPG Image</b><br /><br />"; } if ($_FILES['img1']['size'] > 0) { $img= $_FILES['img1']; $img1 = myimgupload($img); }else{ $img1 = 0; } }else{ $img1 = 0; } $img 1 always enters the database as 0 -- nothing is loading for $_FILES[img1] This script has always worked - but now does not on my local server - still works on the uploaded files on the main server - so i know it is working - also, all files on all my local sigtes are affected in the same way... David
maybe is the problem with the path to the folder you are uploading. While configuring my Apache server on local, I always make two folders, one for the UPLOAD files and one for the SESSIONs.. and write those paths in the php.ini file. Did you try that?