Other User Diary
simple php file uploading code  

<form action="" enctype="multipart/form-data" method="post">
 <input type="file" name="doc" />
 <input type="submit" value="upload">
 </form>
 
 <?php
 $file_path=$_FILES["doc"]["name"];

 if($file_path!=NULL)
 {
  if(move_uploaded_file($_FILES["doc"]["tmp_name"],"$file_path"))
echo "sucess"; 
}
else{
echo "error";
}
 }

 ?>

x-xmax
Country       UNITEDSTATES
City               Ohio
Posted On   16/03/2012

5



Other Pages