Hello,
I have a form to add a Photo in my "add" view (add.ctp). I have two
fields in the view:
echo $form->hidden('Photo.user_id',array('value'=>$user['User']
['id']));
echo $form->input('file', array('type' => 'file'));
Although there are only two fields here, I am using a Helper that
takes the uploaded image and saves file_name, file_type, file_size and
some other columns to the database.
I would like to be able to use this data immediately after the user
submits the form to render the image the image for the user (i.e. in
add.ctp again).
When I try $this->data['Photo'] I just get:
array(
"user_id" => "1",
"file" => array()
)
Which is simply the data I submitted. I would like to pass back the
data from my PhotoController via my add() function, but I can't quite
figure out how. Can anyone help?
Thanks in advance,
Jonathan
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" 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