Yes, you are right, when I just pass Student.id to the view, it is
working fine. However, I couldn't pass Student.id through redirect as
in
$this->redirect('controller'=>'MotorDevelopments','action'=>'view',
$student_id)
because it is giving the undefined variable error.

So, i did that through session and it is working fine. As suggested
in :
http://stackoverflow.com/questions/4427829/cakephp-passing-data-to-view-after-redirect

Now i'm able to access $student_id in the view.

Thanks a lot.

On Nov 17, 3:32 pm, phpMagpie <[email protected]> wrote:
> Jeremy is right, redirect sends a new request to the url you specified i.e.
> /motor_developments/search/$studentInfo and as $studentInfo is an array you
> cannot do this.
>
> How about just passing the Student.id and doing the Student->find() in the
> redirected controller?
>
> HTH, Paul.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to