Hai... In 'if' condition u did not mention the $ symbol. if ($this->data)
Good Luck On 2/6/10, John Andersen <[email protected]> wrote: > Wrong answer, sorry! > Your code is wrong here: > > if(!empty(this->data)) > > should be: > > if(!empty($this->data)) > > Enjoy, > John > > On Feb 6, 9:20 pm, John Andersen <[email protected]> wrote: >> You have to speicfy that you are using the Registration model! Add the >> code: >> [code] >> var $uses = array('Registration'); >> [/code] >> to your controller! Enjoy ;) >> John >> >> On Feb 6, 10:37 am, priyanka123 <[email protected]> wrote: >> >> > Hi.. >> > I need your help in cakephp.Actually i have started but get error in the >> > page which is not solved by me.. >> > Here is the code of controllers page.. >> > <?php >> > class RegistrationsController extends AppController { >> > var $name='Registrations'; >> > var $helpers = array('Html', 'Form'); >> > function regadd(){ >> > $this->set('dd',$this->Registration->find('all')); >> > } >> > function add() >> > { >> > if(!empty(this->data)) >> > { >> > $this->Registration->create(); >> > if($this->Registration->save($this->data)) >> > { >> > $this->Session->setFlash('The Registration has been >> > saved'); >> > $this->redirect(array('action'=>'regadd'), null, true);} else { >> >> > $this->Session->setFlash('Registration not saved. Try again.'); >> >> > } >> >> > } >> > } >> > } >> > ?> >> >> > The error is: >> > Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting >> > T_PAAMAYIM_NEKUDOTAYIM in >> > C:\wamp\www\cakephp\app\controllers\registrations_controller.php on line >> > 10 >> >> > Please help me out in this.... >> > Thanks >> >> > -- >> > View this message in >> > context:http://old.nabble.com/urgent-help-tp27477638p27477638.html >> > Sent from the CakePHP mailing list archive at Nabble.com. >> >> > > 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 > -- Thanks with Regards, M.Karthik MCA 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
