I've tried that several times!
It's writing to it as the debug spits it out after i write to it but
then it does not save it from page to page.
The code I presented yields this array while debugging $_SESSION:
Array
(
[Crumbs] => Array
(
[1] => Array
(
[crumb_link] => /
[crumb_name] => Home
)
)
)
so it gets INTO $_SESSION it just doesn't carry over.
On Mar 21, 4:48 am, John Andersen <[email protected]> wrote:
> Look in the manual athttp://book.cakephp.org/view/399/writefor
> understanding the session write method! You are missing the first
> parameter! The second parameter should be your data!
>
> Enjoy
> John
>
> On Mar 21, 11:36 am, Charles <[email protected]> wrote:
>
> > I started a simple breadcrumb component. I am trying to use the
> > session in order to keep track of, where the user is in the system and
> > where he came from. I've broke it down to it's most basic form and for
> > the life of me I cannot get my sessions to save! I've already tried
> > setting my session security to "low" to no avail.
>
> > <?php
>
> > class CrumbComponent extends Object{
> > var $components = array('Session');
> > function breadCrumb($newPageArray = null, $reset = null){
>
> > $crumbCount = count($_SESSION['Crumbs'])+1;
>
> > echo $crumbCount;
> > $crumb_array[$crumbCount] = array('crumb_link' =>
> > $newPageArray
> > ['link'],
> >
> > 'crumb_name' =>
> > $newPageArray['name'],);
>
> > $current_crumb_array = array('Crumbs' => $crumb_array);
>
> > $this->Session->write($current_crumb_array);
> > echo "<pre>";
> > debug($_SESSION);
> > echo "</pre>";
> > }
> > }
> > ?>
>
> > I tried to get a count and +1 because at first i thought it wasn't
> > incrementing the sessions for whatever reason.. but this still does
> > not work.
>
> > Any clues or something I need to set in order to have the session
> > save??
>
> > Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---