Gerald

Perfect solution once again!

Many Thanks
Steve


> Steve,
> 
> the problem here is, that Apache::Session only stores the data to the
> database if it is modified, but Apache::Session only recognizes
> modifications on the first level. That means your first push works, because
> the array is created, the second push doesn't work because only the array is
> changed. This change is on the second level (not directly in %udat). The
> solution to this problem is simply to force a change on the first level, so
> Apache::Session saves your data. The simplest thing is to add just after
> your push a
> 
> $udat{dummy}++ ;
> 
> Gerald
> 
> 
> >
> > Am still having a bit of a nightmare with my sessions. This is difficult
> to explain but here I go with an attempt - sorry that it's a long one.......
> >
> > On one page I have three frames.
> >
> >  In the top frame I am filling and array in %udat with data and then
> displaying a select box with the list of data out of this array. The value
> of each item in the select box is relevant to it's position in the array -
> so the first item's value is 0, second is 1 and so on.
> >
> > "onchange" the form the select box resides in is submitted to the middle
> frame which displays more information about the element in the array that
> was selected.
> >
> > Then on a button click I submit the arrays element number to the bottom
> frame - which appears blank to the user. Behind the scene it is supposed to
> push the data out of the chosen element in the array on to another array.
> "onload" it then changes the middle frame to a page that displays a table of
> all the items that have been pushed on to this second array.
> >
> > Unfortunately - It only ever seem to push one element on to the array.
> > My initial array is $udat{rtscos} and I wish to push the data out of it a
> line at a time when selected on to $udat{rtsco}
> >
> > This is the code I am using in the bottom frame (Last three lines are to
> print debug information):
> >
> > [-
> > $rtscos = $udat{rtscos};
> > push (@{ $udat{rtsco} }, $rtscos->[$fdat{rtscoselem}]);
> >
> > $rtsco = $udat{rtsco};
> > print "test" . $rtsco->[0] . "\n";
> > print "test1" . $rtsco->[1] . "\n";
> > -]
> >
> > When I hit the page - the top frame displays the list of everything in
> $udat{rtscos}. Then I submit the element to the middle frame which displays
> more information about the element in the array that was selected.
> >
> > I then submit the middle frame to the bottom frame which pushes the
> element on to the array as desired and a table is displayed in the middle
> frame correctly showing the element that has just been pushed on to the
> array $udat{rtsco}.
> >
> > When I go through the process again however - I still only see in the
> table in the middle frame the first element that was pushed on to the array.
> >
> > The debug info in the bottom frame correctly shows that $rtsco->[1]
> contains information. If I run through the process again $rtsco[1] then
> contains the element that has most recently been selected which should
> really have been pushed on to the array and reside in $rtsco->[2].
> >
> > What I think is happening is that the process works correctly the first
> time and the data is correctly stored in the session in the database. Second
> time round It gets pushed on to the array and is printed out but doesn't get
> stored properly in the database. (I presume the data in %udat is in memory
> during processing the page and is stored in the database at the end of
> processing)
> >
> > Any ideas why this is?
> >
> 
> 
> -------------------------------------------------------------
> Gerald Richter    ecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
> 
> Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
> E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
> WWW:        <a href="/bti/redirect.html?http://www.ecos.de"; 
>target="newLink">http://www.ecos.de</a>      Fax:      +49 6133 925152
> -------------------------------------------------------------
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to