Q:

how to upload image in joomla admin componenet?

i have not found a suitable answer can anyone plese tell me the way to upload images and send mail through a mvc component in joomla what are the changes required in model view controller of the component
i have done building component for the admin backend using the following example 
http://www.joomladevuser.com/tutorials/components/component-dev-partii
how can i implement image file upload through browse in the following example can anyone help me .

A:

$src = $file ['tmp_name'];   // source temp location 
$dest = JPATH_COMPONENT . DS . "logo" . DS . $newfilename; // destination 
JFile::upload ( $src, $dest );  // file upload function in joomla
$result = $model->updatePic ( $filename );   // update function has you require to update the filename in database .

