Jump to content

Recommended Posts

hi everybody... i cant explain why i have this error.... i do this upload files thing many times but now... i have 2 php files one is like this:

*****************

<form id="form1" name="form1" method="post" action="go_upload.php">
  <table width="900" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><p>Imagen de Muestra:
        <input name="filename1" type="file" id="filename1" value="..."  size="60" />
      </p>

     bla

     bla

     bla

     <input type="submit" name="button" id="button" value="Upload File" />

</form>

 

the other file is like this

go_upload.php

***********************

$target = "models_bags/";
 $target = $target . basename( $_FILES['filename1']['name']) ;   <- line 55
 $ok=1;
 if(move_uploaded_file($_FILES['filename1']['tmp_name'], $target))   <- line 57

 {
 echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
 }
 else {
 echo "Sorry, there was a problem uploading your file.";
 }

 

 

THE ERROR WHEN I RUN THE FILES IS:

Notice: Undefined index: filename1 in C:\Mywebsites\bagsite\go_upload.php on line 55

Notice: Undefined index: filename1 in C:\sitiosweb\imprebolsa\go_upload.php on line 57
Sorry, there was a problem uploading your file.

 

tnx for help me plssss

Edited by Karyna
Link to comment
https://forums.phpfreaks.com/topic/278287-missing-variable-when-uploading-file/
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.