Welcome Guest, Not a member yet? Register   Sign In
Please help image profile
#1

[eluser]sparky2910[/eluser]
I have view


Code:
<div class="container">
    <div class="row">
        <h3>Upload profile picture</h3>
        

    </div>
    <div class="row">
        <p>
            <a href="&lt;?=site_url('users/back')?&gt;" class="btn btn-info">Back</a>
        </p>
        
        <table class="table table-striped table-bordered table-hover">
            <thead>
                &lt;?php echo $error;?&gt;

                &lt;?php echo form_open_multipart('users/uploadPic');?&gt;
                <p>&lt;input type="file" name="userpic" size="20" class="btn btn-warning"/&gt;&lt;/p>
                
                <p>&lt;input type="submit" value="upload" class="btn btn-success"/&gt;&lt;/p>
              &lt;/form&gt;
            </thead>
                
        </table>
              
    </div>
</div>


I have controller Users

// THIS CONTROLLER USERS
Code:
public function formPic()
    {
        $this->load->view('includes/header');
        $this->load->view('menu/users_menu');
        $this->load->view('users_views/users_pic',array('error' => ' '));
    }
    
    public function uploadPic(){
        ????
    }
    
    public function resizePic(){
        ???
    }


I have folder ./images/ <- here i don"t know user_id

and place in database users (picture 255 varchar)

Please help how upload picture resize put folder ./images/maybe "id_users" and put into table picture ?
#2

[eluser]CroNiX[/eluser]
Did you happen to read these?
http://ellislab.com/codeigniter/user-gui...ading.html
http://ellislab.com/codeigniter/user-gui...e_lib.html
#3

[eluser]sparky2910[/eluser]
I did resize and upload picture into folder
Please how show this picture in php ?

Path = ./assets/pictures/

but didn't work
#4

[eluser]vamsisnikky[/eluser]
Hi Sparky,

you can call like this

Code:
<img src="./assets/pictures/&lt;?php echo $picname; &gt;">




Theme © iAndrew 2016 - Forum software by © MyBB