Isn't that less secure. Someone could change the value of the post_id in firebug or similar. Isn't it a better practice to add it in the controller?
On Oct 12, 4:03 am, Thomas Ploch <[email protected]> wrote: > You would of course have to pass the post_id manually to the view and > add a hidden input field: > > $this->Form->input('Model.post_id', array('type' => 'hidden', 'value' => > $post_id)); > > This way the post id will be added to $this->data and saved to the > database (if the form is valid of course). > > Kind regards > Thomas > > On 12.10.2011 09:51, Media Affect wrote: > > > > > > > > > Does anyone have an example of a controller for passing the post_id to > > a comments add controller they would share? Does sessions need to be > > on? I don't want a dropdown after baking. I can get the post_id into > > the comments add url but, it won't seem to add the post_id to the > > database? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
