that you have an error in your echo statement! One left bracket too
much! Please clarify whether that was a typo and if removed, fixed
your issue!
In stead of using echo in your controller, turn on debugging in the
config/core.php file and use the statement:
[code]
debug($this->Session->read('user_id'));
[/code]
Enjoy,
John
On May 28, 3:36 pm, Binu <bino...@gmail.com> wrote:
> <?php
> class PagesController extends AppController{
>
> var $components = array('Session');
> var $uses = array('Page','PageComment');
>
> function display() {
> echo $this->Session->read(('user_id');
> }}
>
> ?>
>
> On May 27, 7:22 pm, John Andersen <j.andersen...@gmail.com> wrote:
>
> > How does your pages controller look like, the code?
> > Enjoy,
> > John
>
> > On May 27, 10:11 am, Binu <bino...@gmail.com> wrote:
>
> > > Hi,
>
> > > I am using cakephp1.2 . I have override the pages controller. While
> > > login from my application, Im setting thesessionand redirecting to
> > > pages controller, but there I couldnotable to get thesession. If I
> > > redirect to some other controller, Im getting thesessionover there.
> > > I have a table with name "pages", and when the user clicks on the
> > > links (passing page name), Im taking data from that table and
> > > displaying using pages_controller.
>
> > > Can Inotuse "pages" as table name ? Orsessionwon't work in
> > > pages_controller ?
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:
Post a Comment