my code is
Code: Select all
if (isset($upload)) {
if ($HTTP_POST_FILES['filename']['size'] <= 0)
{
print "There was an error uploading your file.<Br>";
print "Go $url";
exit();
} else {
copy($HTTP_POST_FILES['filename']['tmp_name'],
$HTTP_POST_FILES['filename']['name']);
print "Your file have been sucsessfully uploaded.<br>";
print "Go $url";
exit();
}}Code: Select all
<form action="notepad.php?upload=$filename" enctype="multipart/form-data" method="post">
Upload file:
<input type="file" name="filename">
<p>
<input type="submit" value="Upload file">
</form>