I'm a little bit of a beginner to CakePHP and PHP in general, but I have OOP experience. I'm trying to make a mini Twitter to get used to the Cake framework.
I have a PostsController class that handles all creating blog posts, editing deleting etc, but I'm having trouble adding and add post form to the same page above the View Posts.
i.e. adding posts works fine when I link to a new page
<p><?php echo $this->Html->link('Add Post', array('action' => 'add')); ?></p>
but while trying to put a form in the same page as the view I don't know how to call the 'add' action to save and use the data taken in in the form.
echo $this->Form->create('Post',array('action' => 'add'));
echo $this->Form->input('title');
echo $this->Form->input('body', array('rows' => '3'));
echo $this->Form->end('Save Post');