Try print_r($_FILES) and see if you really get what you should. And also check if you have your
form set as
<form enctype="multipart/form-data" action=" url " method="POST">

David Russell wrote:

Hi all,

I have a form with a file upload section. The target script contains the

if (is_uploaded_file($_FILES['newuserfile']['tmp_name'])) {
AddAttachment($BPFNo, $newuserfile, $newuserfile_name,
$newuserfile_size, $newuserfile_type);

AddAttachment() is an included function which works elsewhere.

When running this, I get the following error:
Notice: Undefined index: newuserfile in
c:\webpages\intranet\htmlroot\optimiza\bpf\updatebpf.php on line 77

And obviously, the attachment is not added.

Where can I look for info on the $_FILES global array, and start
narrowing down the problem.

One caveat - I currently have no internet access (e-mail only). Could
people please e-mail me information especially if they want to include
links to relevant websites.


David Russell
IT Support Manager
Barloworld Optimus (Pty) Ltd
Tel: +2711 444-7250 Fax: +2711 444-7256

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to