all groups > inetserver asp db > june 2006 >
You're in the inetserver asp db group:
Sessions
inetserver asp db:
few quik questions..... i have sessions sesrt on my page to check for user ogins. if the session is true, then they are logged in. would it be better to use cookies? i havnt learned how to use those yet, but i can learn. (if thats best way, then anyone provide me a link to a good tutorial for one?) also, is it best to use an INCLUDE FILE to store all the variables that are used each page...........or is there a better way to store variables for each user on each page? thank you for any help anyone can provide.
im sry those were typos........ sesrt = set ogins = logins yes the variable is true in the session im just wanting users to login, and need to know the best way to save their login information. if sessions are used, then they are closed when the browser is closed.....i really dont want that....................i would like the user to be able to stay logged in while they are off the page, for a certain amount of time [quoted text, click to view] "Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message news:Xns97E3C23EDB03eejj99@194.109.133.242... > James Jones wrote on 15 jun 2006 in microsoft.public.inetserver.asp.db: > >> few quik questions..... >> >> >> i have sessions sesrt on my page to check for user ogins. if the >> session is true, then they are logged in. would it be better to use >> cookies? i havnt learned how to use those yet, but i can learn. (if >> thats best way, then anyone provide me a link to a good tutorial for >> one?) >> >> >> also, is it best to use an INCLUDE FILE to store all the variables >> that are used each page...........or is there a better way to store >> variables for each user on each page? > > This is far to quick a question for me, please ask slowly, James. > > Tell us what is a sesrt? > And what are ogins. > > How can the session be true? > Do you mean a specific session variable having a value true? > > The best way is always a matter of opinion and taste, > and what you are trying o accomplish, > [which you did not tell] > so no one can answer that for you. > > -- > Evertjan. > The Netherlands. > (Please change the x'es to dots in my emailaddress)
[quoted text, click to view] >> and what you are trying o accomplish,
What is 'o' ? Don't you just hate that ? :>) Bob Lehmann [quoted text, click to view] "Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message news:Xns97E3C23EDB03eejj99@194.109.133.242... > James Jones wrote on 15 jun 2006 in microsoft.public.inetserver.asp.db: > > > few quik questions..... > > > > > > i have sessions sesrt on my page to check for user ogins. if the > > session is true, then they are logged in. would it be better to use > > cookies? i havnt learned how to use those yet, but i can learn. (if > > thats best way, then anyone provide me a link to a good tutorial for > > one?) > > > > > > also, is it best to use an INCLUDE FILE to store all the variables > > that are used each page...........or is there a better way to store > > variables for each user on each page? > > This is far to quick a question for me, please ask slowly, James. > > Tell us what is a sesrt? > And what are ogins. > > How can the session be true? > Do you mean a specific session variable having a value true? > > The best way is always a matter of opinion and taste, > and what you are trying o accomplish, > [which you did not tell] > so no one can answer that for you. > > -- > Evertjan. > The Netherlands. > (Please change the x'es to dots in my emailaddress)
James Jones wrote on 15 jun 2006 in microsoft.public.inetserver.asp.db: [quoted text, click to view] > few quik questions..... > > > i have sessions sesrt on my page to check for user ogins. if the > session is true, then they are logged in. would it be better to use > cookies? i havnt learned how to use those yet, but i can learn. (if > thats best way, then anyone provide me a link to a good tutorial for > one?) > > > also, is it best to use an INCLUDE FILE to store all the variables > that are used each page...........or is there a better way to store > variables for each user on each page?
This is far to quick a question for me, please ask slowly, James. Tell us what is a sesrt? And what are ogins. How can the session be true? Do you mean a specific session variable having a value true? The best way is always a matter of opinion and taste, and what you are trying o accomplish, [which you did not tell] so no one can answer that for you. -- Evertjan. The Netherlands.
James Jones wrote on 15 jun 2006 in microsoft.public.inetserver.asp.db: [quoted text, click to view] > "Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message > news:Xns97E3C23EDB03eejj99@194.109.133.242... >> James Jones wrote on 15 jun 2006 in >> microsoft.public.inetserver.asp.db: >> >>> few quik questions..... >>> >>> >>> i have sessions sesrt on my page to check for user ogins. if the >>> session is true, then they are logged in. would it be better to use >>> cookies? i havnt learned how to use those yet, but i can learn. (if >>> thats best way, then anyone provide me a link to a good tutorial for >>> one?) >>> >>> >>> also, is it best to use an INCLUDE FILE to store all the variables >>> that are used each page...........or is there a better way to store >>> variables for each user on each page? >> >> This is far to quick a question for me, please ask slowly, James. >> >> Tell us what is a sesrt? >> And what are ogins. >> >> How can the session be true? >> Do you mean a specific session variable having a value true? >> >> The best way is always a matter of opinion and taste, >> and what you are trying o accomplish, >> [which you did not tell] >> so no one can answer that for you.
[please do not toppost on usenet] [quoted text, click to view] > im sry those were typos........ > sesrt = set > ogins = logins > yes the variable is true in the session
That is not the same. A session variable is a serverside variable that can be used all over the session and while in session: <% session("mySessionVariable") = true %> [quoted text, click to view] > im just wanting users to login, and need to know the best way to save > their login information.
There is no "best" way, and there are many good ways. [quoted text, click to view] > if sessions are used, then they are closed > when the browser is closed.....i really dont want > that.. > ...i would like the user to be able to stay > logged in while they are off the page, for a certain amount of time
Impossible because that is not the definition of "logged in" However, you can use a cookie in stead of a session variable. try: <% response.cookies("myCookie") = true response.cookies("myCookie").expires = Date + 365 %> and <% if requesst.cookies("myCookie") then response.write "Yes!" end if %> -- Evertjan. The Netherlands.
im just want to find the best way to log a user in, and have the user stay logged in for more than 20mins of inactivity. and the best way to store variables for the user........i like sessions, but im not sure if there is a easier way. [quoted text, click to view] "Bob Lehmann" <nospam@dontbotherme.zzz> wrote in message news:%23tlp15MkGHA.3536@TK2MSFTNGP05.phx.gbl... >>> and what you are trying o accomplish, > What is 'o' ? > > Don't you just hate that ? :>) > > Bob Lehmann > > > "Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message > news:Xns97E3C23EDB03eejj99@194.109.133.242... >> James Jones wrote on 15 jun 2006 in microsoft.public.inetserver.asp.db: >> >> > few quik questions..... >> > >> > >> > i have sessions sesrt on my page to check for user ogins. if the >> > session is true, then they are logged in. would it be better to use >> > cookies? i havnt learned how to use those yet, but i can learn. (if >> > thats best way, then anyone provide me a link to a good tutorial for >> > one?) >> > >> > >> > also, is it best to use an INCLUDE FILE to store all the variables >> > that are used each page...........or is there a better way to store >> > variables for each user on each page? >> >> This is far to quick a question for me, please ask slowly, James. >> >> Tell us what is a sesrt? >> And what are ogins. >> >> How can the session be true? >> Do you mean a specific session variable having a value true? >> >> The best way is always a matter of opinion and taste, >> and what you are trying o accomplish, >> [which you did not tell] >> so no one can answer that for you. >> >> -- >> Evertjan. >> The Netherlands. >> (Please change the x'es to dots in my emailaddress) > >
Bob Lehmann wrote on 16 jun 2006 in microsoft.public.inetserver.asp.db: [quoted text, click to view] >>> and what you are trying o accomplish, > What is 'o' ?
Eiher my fingers are geing shorer, or he keyboard key "" is no reacing as i should. [quoted text, click to view] > Don't you just hate that ? :>)
Yes, I hae when i does ha, Bob! -- Evertjan. The Netherlands.
James Jones wrote on 16 jun 2006 in microsoft.public.inetserver.asp.db: [quoted text, click to view] > im just want to find the best way to log a user in, and have the user > stay logged in for more than 20mins of inactivity. and the best way to > store variables for the user........i like sessions, but im not sure > if there is a easier way. >
The session timeout can be changed by your code. -- Evertjan. The Netherlands.
o yea, i forgot that is possible........... ..how would i be able to detect if a user is activley browsing? [quoted text, click to view] "Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message news:Xns97E46208D7513eejj99@194.109.133.242... > James Jones wrote on 16 jun 2006 in microsoft.public.inetserver.asp.db: > >> im just want to find the best way to log a user in, and have the user >> stay logged in for more than 20mins of inactivity. and the best way to >> store variables for the user........i like sessions, but im not sure >> if there is a easier way. >> > > The session timeout can be changed by your code. > > -- > Evertjan. > The Netherlands. > (Please change the x'es to dots in my emailaddress)
James Jones wrote on 17 jun 2006 in microsoft.public.inetserver.asp.db: [quoted text, click to view] > "Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message > news:Xns97E46208D7513eejj99@194.109.133.242... >> James Jones wrote on 16 jun 2006 in microsoft.public.inetserver.asp.db: >> >>> im just want to find the best way to log a user in, and have the user >>> stay logged in for more than 20mins of inactivity. and the best way to >>> store variables for the user........i like sessions, but im not sure >>> if there is a easier way. >>> >> >> The session timeout can be changed by your code.
[please do not toppost on usenet] [quoted text, click to view] > o yea, i forgot that is possible........... > > .how would i be able to detect if a user is activley browsing?
Do you mean, if a page is requested? Isn't that self evident? You could put this in each page: <br><% if session("accessed")<>"" then response.write "Last access in this session on: " & session("accessed") end if session("accessed") = now() %><br> -- Evertjan. The Netherlands.
[quoted text, click to view] James Jones wrote: > few quik questions..... > > > i have sessions sesrt on my page to check for user ogins. if the session is > true, then they are logged in. would it be better to use cookies? i havnt > learned how to use those yet, but i can learn. (if thats best way, then > anyone provide me a link to a good tutorial for one?)
'Setting the value of a cookie Response.Cookies("MyCookie") = "value" 'Setting the values of cookie keys Response.Cookies("MyCookie")("MyKey") = "value" Response.Cookies("MyCookie")("MyOtherKey") = "anothervalue" 'Setting the expiration to 30 days from now Response.Cookies("MyCookie").Expires = Date + 30 'Reading the value of a cookie Response.Write Request.Cookies("MyCookie") 'Reading the value of a cookie key Response.Write Request.Cookies("MyCookie")("MyKey") 'Deleting a cookie Response.Cookies("MyCookie").Expires = Date-1 [quoted text, click to view] > > > also, is it best to use an INCLUDE FILE to store all the variables that are > used each page...........or is there a better way to store variables for > each user on each page? > >
What kind of variables? How long do they persist? Are they relevant to other pages? -- Mike Brind
the variables are information about the user that are used anytime the user loads a page..............i was told the sessions take a lot of server resources. so would i be best to use cookies? [quoted text, click to view] "Mike Brind" <paxtonend@hotmail.com> wrote in message news:1150535566.050620.160440@u72g2000cwu.googlegroups.com... > > James Jones wrote: >> few quik questions..... >> >> >> i have sessions sesrt on my page to check for user ogins. if the session >> is >> true, then they are logged in. would it be better to use cookies? i havnt >> learned how to use those yet, but i can learn. (if thats best way, then >> anyone provide me a link to a good tutorial for one?) > > > 'Setting the value of a cookie > Response.Cookies("MyCookie") = "value" > > 'Setting the values of cookie keys > Response.Cookies("MyCookie")("MyKey") = "value" > Response.Cookies("MyCookie")("MyOtherKey") = "anothervalue" > > 'Setting the expiration to 30 days from now > Response.Cookies("MyCookie").Expires = Date + 30 > > 'Reading the value of a cookie > Response.Write Request.Cookies("MyCookie") > > 'Reading the value of a cookie key > Response.Write Request.Cookies("MyCookie")("MyKey") > > 'Deleting a cookie > Response.Cookies("MyCookie").Expires = Date-1 > > >> >> >> also, is it best to use an INCLUDE FILE to store all the variables that >> are >> used each page...........or is there a better way to store variables for >> each user on each page? >> >> > > What kind of variables? How long do they persist? Are they relevant > to other pages? > > -- > Mike Brind >
o ok..... they will be strings............. [quoted text, click to view] "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message news:uiXtjMhkGHA.1264@TK2MSFTNGP05.phx.gbl... > James Jones wrote: >> the variables are information about the user that are used anytime >> the user loads a page..............i was told the sessions take a lot >> of server resources. so would i be best to use cookies? >> > He did not ask about the data stored in the variables. He asked about the > types of variables you are using: are you storing strictly numbers? > strings? arrays? COM objects? > > "a lot" is extremely vague. I use session variables all the time to store > small bits of information about the session: strings and numbers. > > -- > Microsoft MVP - ASP/ASP.NET > Please reply to the newsgroup. This email account is my spam trap so I > don't check it very often. If you must reply off-line, then remove the > "NO SPAM" >
ok thanks a lot everyone! [quoted text, click to view] "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message news:%23qPs3XhkGHA.1264@TK2MSFTNGP05.phx.gbl... > In that case, you are probably better off worrying about some other part > of your application. > > James Jones wrote: >> o ok..... >> >> they will be strings............. >> >> >> >> >> >> "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message >> news:uiXtjMhkGHA.1264@TK2MSFTNGP05.phx.gbl... >>> James Jones wrote: >>>> the variables are information about the user that are used anytime >>>> the user loads a page..............i was told the sessions take a >>>> lot of server resources. so would i be best to use cookies? >>>> >>> He did not ask about the data stored in the variables. He asked >>> about the types of variables you are using: are you storing strictly >>> numbers? strings? arrays? COM objects? >>> >>> "a lot" is extremely vague. I use session variables all the time to >>> store small bits of information about the session: strings and >>> numbers. > > -- > Microsoft MVP - ASP/ASP.NET > Please reply to the newsgroup. This email account is my spam trap so I > don't check it very often. If you must reply off-line, then remove the > "NO SPAM" >
[quoted text, click to view] James Jones wrote: > the variables are information about the user that are used anytime > the user loads a page..............i was told the sessions take a lot > of server resources. so would i be best to use cookies? >
He did not ask about the data stored in the variables. He asked about the types of variables you are using: are you storing strictly numbers? strings? arrays? COM objects? "a lot" is extremely vague. I use session variables all the time to store small bits of information about the session: strings and numbers. -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
In that case, you are probably better off worrying about some other part of your application. [quoted text, click to view] James Jones wrote: > o ok..... > > they will be strings............. > > > > > > "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message > news:uiXtjMhkGHA.1264@TK2MSFTNGP05.phx.gbl... >> James Jones wrote: >>> the variables are information about the user that are used anytime >>> the user loads a page..............i was told the sessions take a >>> lot of server resources. so would i be best to use cookies? >>> >> He did not ask about the data stored in the variables. He asked >> about the types of variables you are using: are you storing strictly >> numbers? strings? arrays? COM objects? >> >> "a lot" is extremely vague. I use session variables all the time to >> store small bits of information about the session: strings and >> numbers.
-- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
Don't see what you're looking for? Try a search.
|
|
|