Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. foreach($_FILES['documents']['tmp_name'] as $key => $tmp_name)
  2. {
  3. $file_name = $key.$_FILES['documents']['name'][$key];
  4. $file_size =$_FILES['documents']['size'][$key];
  5. $file_tmp =$_FILES['documents']['tmp_name'][$key];
  6. $file_type=$_FILES['documents']['type'][$key];
  7. $name = $_POST['uname'][$key];
  8. $email = $_POST['uemail'][$key];
  9. $password = $_POST['epass'][$key];
  10. $file_names = time().$file_name;
  11.  
  12.  
  13.  
  14. $query = "INSERT INTO `table` VALUES
  15. ('', '$name', '', '', '$email', '$password', 1, '', 1, '', '$file_names', '$file_names', '', '', '', '', 1, '', '', '1', '')";
  16. $resultl = $db->insert($query);
  17.  
  18. $userId = mysql_insert_id();
  19.  
  20. $output_dir = $_SERVER['DOCUMENT_ROOT']."uploads/users/$userId/";
  21. mkdir('$output_dir' ,0777) ;
  22. chmod('$output_dir',0777);
  23.  
  24. mkdir('$output_dir' ,0777) ;
  25. chmod('$output_dir',0777);
  26.  
  27. mkdir($output_dir ,0777) ;
  28. chmod($output_dir,0777);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement