Hi Friends,
I am newbie in php , when I execute code i got error as "*Error: * Call to
a member function create() on a non-object
*File: * C:\wamp\www\cakephp06\app\View\Users\index.ctp
*Line: * 1"
my view is :
index.ctp
==========
<?php echo $form->create(null, array('action' => 'index'));?>
<fieldset>
<legend>Enter Your Name</legend>
<?php echo $form->input('name'); ?>
</fieldset>
<?php echo $form->end('Go');?>
UsersController.php
==================
<?php
class UsersController extends AppController {
var $name = 'Users';
var $helpers = array('Form','Html');
var $uses = array();
function index() {
if (!empty($this->data)) {
//data posted
echo $this->data['name'];
$this->autoRender = false;
}
}
}
?>
pls let me know what's the error there .
Thanks
Anes
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.