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!

user information

Status
Not open for further replies.

michael75

IS-IT--Management
Jan 5, 2001
1
CH
how do i collect and store information about my visitors?
are there examples around that could give me some impressions. i dont mind storing the values in a text file.
thanks for your help
greetings mike
 
How about:

<CFOUTPUT>
<CFSET Session.UserID = &quot;#CGI_Remote_User#&quot;>
</CFOUTPUT>

This would save the username of the individual using the application (assuming you are using security on the site) as a session variable cassed UserID.

You could put the following in an INPUT statement in a form and save the username in a record.

<INPUT Name=&quot;UserName&quot; Value=&quot;#CGI_Remote_User#&quot;>

The you could always put the UserName in a CFIF statement and display only certain fields depending upon who they are, etc.
 
I think you need to be more specific in regards to what you want. If you mean you want to store information about your visitors for use in their session such as their name, address, phone, etc... then session variables or client variables are both good choices. If you mean that you want to store information such as their browser version, IP number, computer OS, first visit, etc.. for YOUR later user then I would recommend storing them in a database. A flat file would work but doesn't make it easy to view the results (unless you like Excel). If your question of &quot;how do I collect and store...&quot; means you want to know how to find their information, check the section on CGI variables in the docs for a good start. If you mean how do you store it once you get it, you would just use a simple <cfquery> to put the variables into a database (or <cffile action=&quot;append&quot;...> for a flat file).

If you can be more specific about what you're wanting to do, I could post some example code.

GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top