Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Client Management Question

Status
Not open for further replies.

ma701sd

IS-IT--Management
Dec 15, 2000
94
GB
Hi,
I have opted to use client management to trak users however,
I have decided not to use cookies so I am passing the
?#URLTOKEN# from page to page (which is a combo of CFID and CFTOKEN..is my understanding correct??)
I have also set up my data source to store client variables in a database (which looks to be setup OK), however:

Q1) Each user (CFID) that logs in should be incremented
by 1 each time until the max number of users is
reached in my database, but instead, my database just
overwrites the previous user who logged in with the new
one ..Why is this happening??

Q2) When I launch IE or netscape, and log in as a valid
user, authentification is true...which is correct,
however, when I click back on the browser button to
log in a different user and submit, the previous user I
logged in as is displayed, but if click refresh, the
second user I logged in as is displayed...I dont think
this is a caching problem because I,ve specified the
cache to be refreshed everytime.


Im terribly confused now (Especially as It was working before but i dont know what I did to mess it up!!!! I know..I deserve a slap on the wrist!!)

Help would be greatly appreciated

BTW, Have a happy new year!!!!

Sam

 
Sam,

State management can seem tricky but it doesn't have to be.
You have to be careful when testing state from the same browser (the client) from the same session. Simply logging on as a diffent member doesn't cause the assignment of new token variables. All the built-in client variables (which include CFID and CDTOKEN) are stored as cookies within the client (your browser) whether you have setclientcookies set to yes or not. The only way to get your external database to add another row for a new session on the same machine using the same browser is to clear the current session on the client side by using the following syntax:

<cfcookie name=&quot;cfid&quot; expires=&quot;now&quot;>
<cfcookie name=&quot;cftoken&quot; expires=&quot;now&quot;>
<cfcookie name=&quot;cfglobals&quot; expires=&quot;now&quot;>

on the action page of a Logout button.

There are 2 definitive books out on CF programming in my opinion. They are:
1: Mastering ColdFusion 4.5 by Danesh and Motlagh (authors)
2: ColdFusion web application construction kit by Forta (author)

You coud do with one or the other but I find that they complement one another very well. I have them both and they are awesome.

Lenny
 
Hi Lenny,

Thanks for the reply.
How would I implement the logout?
Where would I place the logout code?

AT present I have a login page where the users logs in, this is directed to a authentificate page wo check agaianst the DB and if it is successful, the user is directed to the welcome page (using cflocation URL).
AT this stage, the user is logged in, however, ive included a logout link but it doesnt seem to work.
I guess, In essence, how could I check that the user is actually logged out?

I also hve a few other confusions but not sure how to put them into words, as soon as I've figured it out, is it OK if I post another thread?? :)

Many thanks for your help

Sam
 
I think i got the problem sussed!!
sam....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top