trouble with upload
Posted: Tue Oct 22, 2002 1:01 pm
i have an upload html file like this
and a php file like:
It is not working.
I wanted to know what i have gotten wrong or it it is something else besides the code.
Thanks for any help
Code: Select all
<form action="upload.php" method="post" ENCTYPE="multipart/form-data">
<input type="file" size=40 name="file"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="submit" value="upload">
</form>Code: Select all
<?php
if ($file == "none") {
print "You must specify a file to upload";
}
else {
copy($file, "/images/$file_name");
unlink($file);
}
?>I wanted to know what i have gotten wrong or it it is something else besides the code.
Thanks for any help