Can't save image-album_id and image-name after file-upload to server.

2010-03-07 Thread mattyh88
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

Re: Can't save image-album_id and image-name after file-upload to server.

2010-03-07 Thread mattyh88
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

Re: Can't save image-album_id and image-name after file-upload to server.

2010-03-07 Thread cricket
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

Re: Can't save image-album_id and image-name after file-upload to server.

2010-03-07 Thread mattyh88
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);