Thanks for the help. I got it working using your example.
My other problem was setting write permission to the folder.
><?php
if (!is_uploaded_file($_FILES['file']['tmp_name'])) {
$error = "You did not select a file to upload";
unlink($_FILES['file']['tmp_name']);
}
else
{
if( copy($_FILES['file']['tmp_name'],"upload/".$_FILES
['file']['name']) )
{
print "copied";
}
else
{
print "failed";
}
}
?>
<html>
<head></head>
<body>
<form action="load.php" method="post"
enctype="multipart/form-data">
<?=$error?>
<br><br>
Choose a file to upload:<br>
<input type="file" name="file"><br>
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>