Hiya PhP gurus!
I'm trying to build an upload form, from which one can send files to my server. I am using the following code in the HTML file:
<html>
<head></head>
<FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="10000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Stuur Bestand">
</FORM>
</html>
This is the PhP part:
<html>
<head></head>
<body>
<?php
$userfile_name = $_FILES['userfile']['name'];
move_uploaded_file($userfile_name, "e:\test\");
echo $userfile_name;
?>
</body>
</html>
As you can see I'm using a Windows machine, because of the second parameter in the move_uploaded_file command.
I am echoing the $userfile_name to the screen and it looks great, but I can't seem to get the file to move to the e:\test[/b] directory!
Also, you can see I'm using the example out of the manual.
Is there someone who can give me a complete example of how to setup such a HTML upload form and the accompanying PhP file?
Thanks a million!