I don't know if I'm right, but ckeck this out: the echo $_FILES['file']['name'] variable holds the file name on the computer that uploads the file. and in one place you try to move the uploaded file from the temp folder back into the folder where it came from. I suggest you create a new folder on the server you are using and move the file there. Hope it helps.
"Amc" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > Here is a script I'm using to upload files. Can anyone see anything wrong > with it? No file is uploaded when I click the upload button > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > > <html> > > <head> > > <title></title> > > <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0"> > > <meta name="vs_targetSchema" > content="http://schemas.microsoft.com/intellisense/ie5"> > > </head> > > <body> > > > <?php > > echo $_FILES['file']['tmp_name']; > > echo $_FILES['file']['name']; > > move_uploaded_file("{$_FILES['file']['tmp_name']}", > "{$_FILES['file']['name']}"); > > ?> > > > > <form method="post" action="test.php" ID="Form1" > enctype="multipart/form-data"> > > <b>Browse for file to upload:</b><input type="file" name="file" > ID="File1"/><br/> > > <input type="submit" value="Upload!" ID="Submit1" NAME="Submit1"> > > </form> > > </body> > > </html> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php