Wednesday, May 5, 2010

Re: Regarding search Task,,

You appear to be missing a view function for starters. Turn on debug
and set it to 2 to give you some idea why things are failing

Mike Karthauser
Brightstorm limited
Tel: 07939252144

On 5 May 2010, at 07:17, karteek <vemula.karteek@gmail.com> wrote:

> Hi,
> I have the code of Search, but its not work correctly. So, please try
> to find the problem of the below code..
>
> View Template(search.ctp)
> <?php echo $form->create('State',array('action'=>'view',$state
> ['State']
> ['id']));?>
> <fieldset>
> <legend><?php __('Search State');?></legend>
> <?php
>
> #echo $form->input('id');
> echo $form->input('Name');
> echo $form->error('name', 'Please Enter State Name',
> array('wrap'=>true,'class' => 'error-message'));
>
> echo $form->select('country Name');
> echo $form->error('country Name');
> #echo $form->input('active');
> echo $form->submit('Find');
>
> ?>
> <ul>
> <li><?php echo $html-
>> link(__('Search',true),array('action'=>'view',$state['State']
> ['id']));?> </li>
> </ul>
>
> </fieldset>
> <?php echo $form->end();?>
>
>
>
>
> Controller Template::
>
> function search($id) {
> print('hai');
>
>
> //$this->redirect(array('action'=>'view',$State['State']
> ['id']));
> if(!empty($this->data)) {
> $data = $this->State->Country-
>> find($id);//'all',array('conditions'=>array('id'=>$this->data
>> ['State']
> ['id'])));
> $this->set('res',$data);
>
> $this->redirect(array
> ('controller'=>'State','action'=>'State'));
> }
>
> }
>
>
>
> Thank you,
> Karteek
>
> 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 cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this
> group at http://groups.google.com/group/cake-php?hl=en
>

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: