Welcome Guest, Not a member yet? Register   Sign In
UPLOADING PROFILE PICTURE
#1

[eluser]Unknown[/eluser]
hai...I am new to the CODEIGNITER.The data is succussfully inserted into the database.I uploaded one image for profile.And i disply that uploaded image.But that image not move to the specified folder.Because of that after refreshing that image is not displying ..................plz solve this problem.My controller,model,view is given below


Thanks in advance


function changeprofilephoto($member_id)
{
foreach ($_FILES["images"]["error"] as $key => $error)
{
if ($error == UPLOAD_ERR_OK) {
$name = $_FILES["images"]["name"][$key];
move_uploaded_file( $_FILES["images"]["tmp_name"][$key], $this->profilephotos_path. $_FILES['images']['name'][$key]);
$this->create_thumbnail($this->profilephotos_path. $_FILES['images']['name'][$key],$this->profilephotosthumb_path,148,148);
$inputdata['profile_photo'] = $name;
$this->db->where('member_id',$member_id);
$res = $this->db->update('rcb_members',$inputdata);
}
}
}
#2

[eluser]InsiteFX[/eluser]
1) Please use code tags when posting your code.
[code ]
...your code here.
[/code ]
code tags with no spaces in them.

2) You did not mention where your profile image directory is located.




Theme © iAndrew 2016 - Forum software by © MyBB