----- Original Message ----- From: "Al" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 24, 2003 1:14 PM Subject: [PHP] File uploads...
> Trying to do what should be rather simple and I have done before. > Maybe I am just overlooking the obvious but this is the error I get... > > Warning: Unable to open 'Array' for reading: No such file or directory > in /var/www/html/nepso_noah/NEPSO/includes/reporters/update_profile.inc > on line 33 > > This 'Array' is just the value of the name from the form field for the > file upload... > Here are the pieces of the form that seem to matter... > > <form name=\"profile\" method=\"post\" > action=\"$PHP_SELF?action=update_profile\" > enctype=\"multipart/form-data\"> > > <input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"500000\"> > <input type=\"file\" name=\"photonew\"> > > Now when I call to the submitted data > > copy($photonew, "images/reporters/$user_id/$photonew_name"); > > And for error checking I echo the following > > $photonew -- This results as Array <-- though this should be the tmp path??? > $photonew_name -- This gives me the file name > etc... //snip// > Thanks > --Al The uploaded file's path is stored in $_FILES['photonew']['tmp_name']; You could extract($_FILES['photonew']) for convenience sake and access with $tmp_name; - Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php