Hi, My name is Gaurav, I am just the beginner in PHP .. i am coding a webpage which will upload a "word/open office" file ..But after several try i am unable to upload ... I am not clear with different variables needed....Kindly suggest what to do...the lines i have written are below.. <?php $file_dir="/home/gv/Desktop/upload"; echo"path: ".$_FILES["cvt"]."<br> \n"; echo"name: ".$_FILES["cv"]."<br>"; echo"type:".$_FILES["image/jpeg"]."<br>"; echo"size:".$_FILE["10240"]."<br>"; if(is_uploaded_file($_FILES["cvt"])){ move_uploaded_file($_FILES["fileupload"]["cvt"],"$_file_dir".$FILES["fileupload"]["cv"])or die ("Coudn't copy"); echo "file was moved"; } ?> Please suggest what are the errors !!
I suggest you look through links on this page: http://ru2.php.net/manual/en/features.file-upload.php There are simple examples of file uploading and related stuff. Also check comments for useful tips.