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