Advertisement
freddy0512

test

Jun 22nd, 2015
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public function unggah() {
  2.  
  3. if (!empty($_FILES)) {
  4. $tempFile = $_FILES['file']['tmp_name'];
  5. $fileName = $_FILES['file']['name'];
  6. $fileType = $_FILES['file']['type'];
  7. $fileSize = $_FILES['file']['size'];
  8. $targetPath = './testimonial/';
  9. $targetFile = $targetPath . $fileName ;
  10. move_uploaded_file($tempFile, $targetFile);
  11.  
  12.  
  13. //$where=$this->uri->segment(4);
  14. //$this->db->query("UPDATE `testimonial` SET `tes_image` = '$fileName' WHERE `tes_id` = '$where'");
  15.  
  16. $this->db->query("UPDATE `testimonial` SET `tes_image` = '$fileName' WHERE `tes_id` = '4'");
  17.  
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement