uploadTo = PD . "/public/images/"; $this->allowFileType = array('jpg','png','jpeg','gif'); } /* Process the uploaded image and store in database */ public function insertImage() { //$sql = "INSERT INTO ImageStore(ImageId,Image) VALUES('$this->image_id','" . mysql_escape_string(file_get_contents($tmp_image)) . "')"; $query .= "CALL insert_loyalty_member_image_proc (" . $inputModel[$keys[0]] . ", "; for($i = 0; $i < $n-1; $i++) { $query .= "'" . $inputModel[$keys[$i]] . "', "; } $query .= $inputModel[$keys[$i]] . ")"; //return var_dump($query); $rowCount = $this->processImage($query); return $rowCount; } }