Opps forgot to CC the list

-- 

Cheers Stuart
-----------------------------------------------------------
New Zealand Revolution
[EMAIL PROTECTED] 
+64 9 918 7663



On 24 May 2001 14:57:09 -0700, ___cliff rayman___ wrote:
> 
> 
> Stuart Frew wrote:
> 
> > On 24 May 2001 14:21:32 -0700, ___cliff rayman___ wrote:
> > > i'd still use a cookie to indentify the user.  why not include
> > > the client id as part of the submission from the browser.  it
> > > is easy to keep detailed data in the cookie separate for each client
> > > $sessionData{$clientKey}{$clientDataStuff}=$in{DATAKEY}
> > >
> > snip.....
> > Yup you could encode the client ID in to each form but,
> > * If I was to do that I would encode the session ID, and kill to birds
> > with one piece of code.
> 
> encoding the session id is much more difficult as u have now found out.
> which two birds do you kill?
> 
> >
Ah ah I think I see a difference. I am not using the session ID to track
the user, but the track which client/customer the user is processing and
what they are doing.
We Identify the user by $r->connection->user.

I would use encode the session ID into the form to differentate the two
clients the single user is processing.

For us two windows means two sessions.
Yup, could encode it all into one session but see below...

> > * the joys of sessions is that that the state, via the session ID, is
> > avaiable automagicly  without having to code it into each page.
> 
> hmmm.  i think u r misunderstanding my suggestion - or - u r not fully explaining
> what u r trying to do.  look up the <input type=hidden> html tag.  stick that with 
>the
> client id somewhere between your <form> tags. everytime the user submits the form,
> the client id will be submitted also.  assuming that %in comtains all the forms 
>posted
> fields then:
> $session{$in{CLIENTID}}{DATAFIELD1}=$in{DATAFIELD1}
> 
> or more generically (untested - could have typos):
> 
> $session{$in{CLIENTID}}{$_}=$in{$_} for (grep {!/CLIENTID/, keys %in};
> 
But what happens when we go to a page that contains only look up
information.

Say we are on a page that has the main data entry form, but there are
links to lookup pages, such as the client/customers previous purchases.
I don't want to encode the client ID on every link when I can use the
state information with in the lookup page to find out what the
client/customer is.

Also Apache::Session only sees changes at the top level. 
So for ever state change we would have to programaticly make the session
aware of the change. 

Ok not particulary hard or arduous but why take the risk? 


Cheers Stuart
-----------------------------------------------------------
New Zealand Revolution
[EMAIL PROTECTED] 
+64 9 918 7663



Reply via email to