Hello,

i am new in cake. i wan trying the blog example in online manual.

according to manual i created a view called:
/app/views/posts/add.ctp

and added following code:
/app/views/posts/add.ctp

<h1>Add Post</h1>
<?php
echo $this->form->create('Post');
print $form->input('title');
print $form->input('body',array('rows'=>'3'));
print $form->end('Save Post');
?>

but when i click 'Add Post' from index view, it shows following
message.

as per document $form object should be available in view. but it seems
to me, it is not. may be i missed something.


/app/views/posts/add.ctp
Add Post

Notice: Undefined property: View::$form in C:\wamp\www\cake\app\views
\posts\add.ctp on line 5

Fatal error: Call to a member function create() on a non-object in C:
\wamp\www\cake\app\views\posts\add.ctp on line 5



could anyone give me any advice please?



thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to