Karyna Posted May 22, 2013 Share Posted May 22, 2013 (edited) 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 57Sorry, there was a problem uploading your file. tnx for help me plssss Edited May 22, 2013 by Karyna Quote Link to comment Share on other sites More sharing options...
requinix Posted May 22, 2013 Share Posted May 22, 2013 There's one key step you missed. Take a look at the example and make sure you did everything it talks about. Quote Link to comment Share on other sites More sharing options...
Karyna Posted May 22, 2013 Author Share Posted May 22, 2013 MY mistake... upload files doesn´t work when i execute from local host.. i must upload the php files to server THEN EXECUTE from the on line page. tnx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.