Welcome Guest, Not a member yet? Register   Sign In
codeigniter 4 upload multiple images to save data in blob with comma

[font=-apple-system, BlinkMacSystemFont, "Segoe UI", "Liberation Sans", sans-serif]controller[/font]
public function upload_multiple_files() {
        if($this->request->getPost('files_upload')) {
              $files = $this->request->getFiles();
                $img = $files['multiple_files'];
              foreach($img as $im){
                    $name= $im->getName();
                        $im->move('assets/imgs', $name);           
                    $userdata = [
                        'title' => $this->request->getPost('title'),
                        'img' => $name

        echo view('files_upload');
[font=-apple-system, BlinkMacSystemFont, "Segoe UI", "Liberation Sans", sans-serif]View[/font]
            echo form_open_multipart('filesupload/upload_multiple_files', array('id' => 'upload-multiple-files'));
                            <input type="text" name="title" id="title"/>

                    <lable>Upload Multiple Files</lable>
                            <input type="file" name="multiple_files[]" id="multiple_files" readonly="true" multiple/>
                        <input type="submit" name="files_upload" value="Upload Files"/>
[font=-apple-system, BlinkMacSystemFont, "Segoe UI", "Liberation Sans", sans-serif]Table:[/font]
[font=-apple-system, BlinkMacSystemFont, "Segoe UI", "Liberation Sans", sans-serif]want database image name like: a.jpg,b.jpg,c.jpg inside blob[/font]

Attached Files Thumbnail(s)

Theme © iAndrew 2016 - Forum software by © MyBB