Some light reading for you: http://book.cakephp.org/2.0/en/index.html http://book.cakephp.org/2.0/en/tutorials-and-examples.html
Jeremy Burns Class Outfit http://www.classoutfit.com On 5 Mar 2013, at 10:55:37, Victor Musvibe <jaahvi...@gmail.com> wrote: > I trying to pass a variable in cakephp to a view and getting error Undefined > variable: view [APP\View\ItQueries\add.ctp, line 9] and line 9 is this > > <?php echo $this->Form->hidden('status_type', array('value'=>$view)); ?> > > Here is how im defining my variable in the controller > > class ItQueriesController extends AppController { > > var $view = 'Open'; > > public function index() { > $this->ItQuery->recursive = 0; > $this->set('view', $this->view); > > } > > //Other Code > > } > > and here is where im trying to pass the variable as a hidden field > > <?php echo $this->Form->create('ItQuery'); ?> > <?php echo __('Add It Query'); ?></legend> > <?php > echo $this->Form->input('status_type', array('type' => 'hidden', > 'value'=>$view)); > ?> > <?php echo $this->Form->end(__('Submit')); ?> > > Can some please show me how to fix this > > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to cake-php+unsubscr...@googlegroups.com. > To post to this group, send email to cake-php@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.