Why i'm getting this error? :

Notice: Undefined index: DSC00767.JPG  in C:\wamp\www\inz_cake\app
\controllers\language_controller.php on line 48

DSC00767.JPG - this is a uploaded filename from submitted form

view:

....
<?php echo $html->file('Language/picture');   ?>
.....


Controller:

function add()
{

if (!empty($this->data))
        {

if ($this->Language->save($this->data))
            {

                $folder = 'img/obrazki/';
                $fileData = $this->data['Language']['picture'];
                $fileName = '234';


                if (is_writable($folder)) {

                        LINE 48:

if (is_uploaded_file($_FILES[$fileData]['tmp_name']))
                        {
                                copy($_FILES[$fileData]['tmp_name'], 
$folder.$fileName);
                                return true;
                        }
                        else
                        {
                                return false;
                        }
                }
                else
                {
                        return false;
                }

}


                $this->flash('Jezyk zostal zapisany','/language/
language_list');
            }

Any ideas? Thanks

Stan


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to