upload function not working properly
Posted: Fri Jan 30, 2009 7:57 am
i am trying to uplaod a file but i get the following errors
Notice: Undefined index: uploadFile in /nfs/mntI4/projectsite/J.K.Childs/file1.php on line 8
Notice: Undefined index: uploadFile in /nfs/mntI4/projectsite/J.K.Childs/file1.php on line 9
although i can see the lines where the errors should be i cannot understand what they are. can anyone spot what is wrong with this code
here is the code from my website
<form action="file1.php" method="post">
Document to upload (please only upload microsoft word documents others will not work): <input type="file" name="upload">
<input type="submit" name="upload2" value="uploadFile">
</form>
here is the code from my php form
<html>
<head>
<title>Php document for uploading files</title>
</head>
<body>
<?php
move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'],
"../uploads/{$_FILES['uploadFile'] ['name']}")
?>
</body>
</html>
can anyone spot what might be wrong
Notice: Undefined index: uploadFile in /nfs/mntI4/projectsite/J.K.Childs/file1.php on line 8
Notice: Undefined index: uploadFile in /nfs/mntI4/projectsite/J.K.Childs/file1.php on line 9
although i can see the lines where the errors should be i cannot understand what they are. can anyone spot what is wrong with this code
here is the code from my website
<form action="file1.php" method="post">
Document to upload (please only upload microsoft word documents others will not work): <input type="file" name="upload">
<input type="submit" name="upload2" value="uploadFile">
</form>
here is the code from my php form
<html>
<head>
<title>Php document for uploading files</title>
</head>
<body>
<?php
move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'],
"../uploads/{$_FILES['uploadFile'] ['name']}")
?>
</body>
</html>
can anyone spot what might be wrong