Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function unggah() {
- if (!empty($_FILES)) {
- $tempFile = $_FILES['file']['tmp_name'];
- $fileName = $_FILES['file']['name'];
- $fileType = $_FILES['file']['type'];
- $fileSize = $_FILES['file']['size'];
- $targetPath = './testimonial/';
- $targetFile = $targetPath . $fileName ;
- move_uploaded_file($tempFile, $targetFile);
- //$where=$this->uri->segment(4);
- //$this->db->query("UPDATE `testimonial` SET `tes_image` = '$fileName' WHERE `tes_id` = '$where'");
- $this->db->query("UPDATE `testimonial` SET `tes_image` = '$fileName' WHERE `tes_id` = '4'");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement