0

hello friends,
Good Morning ,
i require code for saving path of file in database can any one provide me.

Thank u
Rakesh Nagekar

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by Demiloy
0

This code is works for me finely...You also try it....

if($HTTP_POST_FILES["rfile"]["size"] >1) {	 // for  large image 1
			$ext = substr($HTTP_POST_FILES['rfile']['name'],strpos($HTTP_POST_FILES['rfile']['name'],'.')+1);
			$ext_arr=array("txt","rtf","doc","pdf","rar","zip");
			//if (in_array($ext,$ext_arr)) { 			
				$pfile=substr($HTTP_POST_FILES['rfile']['name'],0,strpos($HTTP_POST_FILES['rfile']['name'],'.'));
				$pfile.=time();
				$pfile.=strstr($HTTP_POST_FILES['rfile']['name'],'.'); 	
				$pfile="resumes/".$pfile;			
				if(!move_uploaded_file($HTTP_POST_FILES['rfile']['tmp_name'],$pfile))
				 { $pfile=""; }
				chmod($pfile,0777); 				
			} else {		
				$pfile="";
			}

You must use this term in you form tag;;
enctype="multipart/form-data"


k...

0

Just don't use $HTTP_POST_FILES, sinces that's deprecated. You can just use $_FILES instead.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.