I am new to cakePHP and have been able to get an imageuploader to
work. However, when i click edit it will only populate the input
fields not the file field, and if i update it like that it creates a
new entry and leaves the file field null. Is there something I am
missing?
My table is named pics with the fields named id, title, file,
description, created, modified
here is my edit function from my pics_controller.php,
//
function edit($id = null)
{
if (empty($this->data))
{
$this->Pic->id = $id;
$this->set('pic', $this->Pic->read());
$this->data = $this->Pic->read();
}
else
{
if ($this->Pic->save($this->data['Pic']))
{
$this->flash('Your post has been updated.','/pics');
}
}
}
//
any advice would be greatly appreciated
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---