Thanks for the advice. I've added "global $HTTP_POST_FILES;" into my function, and it is working.
I'd also like to follow Marek's advice to modify my script, as it sounds like it helps to make it more secure. However, I don't think I'm using the syntax right. I changed:
if( copy($HTTP_POST_FILES['upfile']['tmp_name'],$store_dir.$HTTP_POST_FILES['upfile']['name'])
to
if ( move_uploaded_file($HTTP_POST_FILES[$name]['tmp_name'], $store_dir . basename($HTTP_POST_FILES[$name]['name']) )
... because I looked up move_upload_file() in the manual, and it says it will return FALSE if it fails, so I thought I could encase it in an if() statement. But it's always returning false and not uploading the file. Have I got it wroing?
-- Dave Gutteridge dave@xxxxxxxxxxxxxxx
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php