I've been trying to save some details of my image to the database.
This is what I'm doing: (the upload works, but image-name and image-
album_id don't get inserted in the database)
Form:
?php
echo $form-create('Image', array('type' = 'file', 'action' =
'upload'));
echo
I've just noticed that, when I put the first if (for the image
upload) in comments, then the Image-save does work. The image
successfully gets inserted. It just doesn't work when the first
if (for the image upload) isn't commented. So basically, why does
CakePhp skip my Image-save() (after
Maybe $data is being changed.
$this-log($this-data);
if($this-Image-upload($this-data)) {
$this-Session-setFlash('The image was successfully uploaded.');
$this-log($this-data);
}
On Mar 7, 7:50 am, mattyh88 mathew.hu...@gmail.com wrote:
I've just noticed that, when I put the first if
Thank you for the reply. But i just tried to insert image details in
the db first and then upload the picture and now it works lol. Just by
switching model functions from place.
On 7 mrt, 17:52, cricket zijn.digi...@gmail.com wrote:
Maybe $data is being changed.
$this-log($this-data);