hi..
my table Name:adb_users
this is my: view form:
<h3>Register</h3>
<?php echo $form->create('adb_', array('action' => 'register'));?>
<?php echo $form->input('username');?>
<?php echo $form->input('password');?>
<?php echo $form->input('email');?>
<?php echo $form->input('date');?>
<?php echo $form->submit('Register');?>
<?php echo $form->end(); ?>
Model:
<?php
class User extends AppModel
{
var $tablePrefix = 'adb_';//var $name = 'User';
}
?>
Controller:
<?php
class UsersController extends AppController
{
var $tablePrefix = 'adb_';//var $name = "Users";
var $helpers = array('Html', 'Form');
function register()
{
if (!empty($this->data))
{
$this->adb_->create();// its not entering in to this step;
$this->data['adb_']['username'];
$this->data['adb_']['password']= md5($this->data['adb_']['password']);
$this->adb_->save($this->data);
// $this->set('userMessage', 'Team successfully added!');
$this->redirect(array('action'=>'index'));
}
}
help me how to assing table in view.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
To unsubscribe, reply using "remove me" as the subject.