In the cakephp blog tutorial in the Edit Post edit() action section
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/part-two.html
I can't understand what this code does $this->Post->id = $id;
In the cakephp blog tutorial in the Edit Post edit() action section
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/part-two.html
I can't understand what this code does $this->Post->id = $id;
Your url would be something like /posts/edit/1
, where $id = 1
in this case. What that line does is set the id for the current record that the Post->save() call will affect.