Jump to content

Trouble uploading files --Notice: Undefined index:


Pacopag

Recommended Posts

Hi.  This is my first post, so feel free to lecture me on forum etiquette and conventions.  I'm trying to create a form, several items of which are file upload <input>s.  Here is the relevant code from the form.

 

<label for="facefile">Filename:</label>

<input type="file" name="facefile" id="facefile" />

 

This form has an action="validateform.php".

In the file for validateform.php I can't seem to reference "facefile".  I just try doing

 

<?php echo($_FILES["facefile"]["name"]); ?>

 

And I get

 

Notice: Undefined index: facefile in validateform.php on line 1

 

Link to comment
Share on other sites

The code seems so transparent that I think that there must be a problem with something other than the code.

 

Maybe Apache is not configured right?

 

I've seen similar posts to this where the poster said it was a problem with php.ini.  But he didn't give any details.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.