I am storing username and name in session
foreach($data as $key=>$val)
{
if($val->username == $username && $val->password == md5($password) )
{
$flag=true;
$newdata =array('name'=>$val->name,'username'=>$username);
$this->session->set_userdata($newdata);
break;
}
Now, a user uploads his profile picture, its path gets stored in database, and after that , i am getting that image from database.
public function get_image(){
$this->load->model('UploadModel');
$path= $this->UploadModel->get_path();
}
If i echo $path i got [{"img_path":"http://205.147.101.117/secureadmin/managment-panel/uploads/download_(1)2.jpg"}]
Now I want to store this path in my session variable , so that everytime i login the profile picture got displayed. Now i have 2 questions : 1) How to store this image path in already created session varible 2) Is there anyother way, to display profile picture..
Thank you, in advance