Hi, I need help, I am trying to make a small form so that customer can upload a file to a folder in the site, but I cant seem to make this work, any help would be great:
I am trying just to upload a file to a site, I made a small form too upload with:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “
<html xmlns=”
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<title>File Upload Form</title>
</head>
<body>
This form allows you to upload a file to the server.<br>
<form action=”getfile.php” method=”post”><br>
Type (or select) Filename: <input type=”file” name=”uploadFile”>
<input type=”submit” value=”Upload File”>
</form>
</body>
</html>
Then I made a php file to process it:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “
<html xmlns=”
<head>
<title>Process Uploaded File</title>
</head>
<body>
<?php
move_uploaded_file ($_FILES[‘uploadFile’] [‘tmp_name’],
“../uploads/{$_FILES[‘uploadFile’] [‘name’]}”)
?>
</body>
</html>
I am not trying to use the database, just want to let customer upload a file that goes into a folder. This is the errors I get:
[23-Jan-2008 09:44:10] PHP Notice: Undefined index: uploadFile in /usr/home/joesproduce.com/private/getfile.php on line 9
[23-Jan-2008 09:44:10] PHP Notice: Undefined index: uploadFile in /usr/home/joesproduce.com/private/getfile.php on line 10