Welcome Guest, Not a member yet? Register   Sign In
Using set_value() in callback functions
#1

[eluser]Unknown[/eluser]
I am using callback function to upload the photograph and in callback function I am trying to set the uploaded file_name to a form hidden element. But set_value() do not set the form elements value as I have expected. Can anyone help on this!. For this I am using the code as given below:

$filename = "photo";

if ( ! $this->upload->do_upload($filename))
{
//if uploade fails
$uploade_error = $this->upload->display_errors();
$this->form_validation->set_message('perform_image_upload_members_new', $uploade_error);
return FALSE;
}
else
{
//if file uploaded sucessfully, then file information will be stored in array variable
$upload_data = $this->upload->data();
set_value($filename, $upload_data['file_name']);
}




Theme © iAndrew 2016 - Forum software by © MyBB