Nositi Posted January 23, 2009 Share Posted January 23, 2009 Hi, I found a bunch of tutorials and they all seem to do it the same way. For whatever reason, though, the file doesn't seem to be getting onto the server and I have no idea why. Here's the form: <html> <head> <title> File upload </title> </head> <body> <form action="process_file.php" method="post"><br/> Filename: <input type="file" name="uploadFile" value="uploadFile"> <input type="submit" value="Upload File"/> </form> </body> </html> process_file.php: <html> <head> <title>Processing uploaded file</title> </head> <body> <?php print $_FILES["uploadFile"]["name"] . $_FILES["uploadFile"]["type"] . $_FILES["uploadFile"]["size"] . $_FILES["uploadFile"]["tmp_name"] . $_FILES["uploadFile"]["error"]; ?> </body> </html> I've completely eliminated move_uploaded_file for now, because obviously there's no point if there's nothing there in the first place. So why might this not be working? I can post text just fine. Thanks. Quote Link to comment Share on other sites More sharing options...
gevans Posted January 23, 2009 Share Posted January 23, 2009 Check out this tutorial Currently your form is wrong and the image will not be sent in POST data Quote Link to comment Share on other sites More sharing options...
bluesoul Posted January 24, 2009 Share Posted January 24, 2009 In case the tutorial makes your eyes glaze over, the major bug is in your <form> tag, but that's a handy enough tutorial I'm not gonna tell you what it is. Quote Link to comment Share on other sites More sharing options...
Nositi Posted January 24, 2009 Author Share Posted January 24, 2009 So I was just missing the param enctype="multipart/form-data". Awesome, thanks guys. 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.