Jump to content

[SOLVED] Trying to upload file with post


Nositi

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/142178-solved-trying-to-upload-file-with-post/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.