You don't mention which version you're using, but I'm going to assume 1.2 because of the $form code.
Really, we need to see your controller code to figure this out, but it should be something like this: ... in users_controller.php function register() { if(!empty($this->data)) { if($this->User->create($this->data) && $this->User->save()) { // send success message } else { // send failure message } } } That should be all you need (formatting not preserved). Most of my controller actions follow this pattern, and they work - so if yours doesn't, the problem could be elsewhere. Steve On Feb 3, 8:32 am, swiftguy <[EMAIL PROTECTED]> wrote: > Hello Experts, > > Im a newbie and trying to master cakephp through the IBM's 'Cook up > Web sites fast with CakePHP' > > In this tutorial they have listed a form helper example ..following is > the code snippet > > <p>Please fill out the form below to register an account.</p> > <?php echo $form->create('User', array('action' => 'register'));?> > <?php > echo $form->input('first_name'); > echo $form->input('last_name'); > echo $form->input('username'); > echo $form->input('email'); > echo $form->input('password'); > ?> > <?php echo $form->end('Register');?> > > if i submit this form no record is getting stored to the database, but > if i submit the data using the manual html code (code snippet is > listed below) it works (able to save records to the DB) > > <form action="/cakephp/users/register" method="post"> > <p>Please fill out the form below to register an account.</p> > <label>Username:</label><input name="username" size="40" /> > <label>Password:</label><input type="password" name="password" > size="40" > /> > <label>Email Address:</label><input name="email" size="40" > maxlength="255" /> > <label>First Name:</label><input name="first_name" size="40" /> > <label>Last Name:</label><input name="last_name" size="40" /> > <input type="submit" value="register" /> > </form> > > Im unable to troubleshoot the problem... kindly help me out. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---