473,396 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

can i use tempvars to keep me logged in?

Hi
Can someone tell me if I can use tempvars to keep me "logged in"?

What I mean is, when I log in from my login form can tempvars help me so that whatever I do that my name would be linked to it?

Do you think it can help me to set up privilages that way too?
Dec 7 '10 #1
4 2435
NeoPa
32,556 Expert Mod 16PB
If you are setting up your own security system then yes. You can use a variable (or variables) to store relevant information about your security level.

As the security is only for the current session though, you will need to ensure the scope and the lifetaime are both appropriate. The variables need to be available to all places that need to check them. This could be all encapsulated in its own module, or it may be freely accessible to all your code. If the former, then the variables would need to be visible to that module. If the latter then they would need to be defined as Public in a standard code module.

Remember also the lifetime of the variables. Anything within any procedure, except when defined as Static, will disappear as soon as the procedure completes execution, and will therefore lose your stored data prematurely.

There are many design choices, you need to choose which to use for yourself. My recommendation is that you consider your options carefully before deciding. Design the concept before starting to code it in.

Good luck.
Dec 7 '10 #2
Hi, thanks for your reply.

However, I have no clue how the tempvars is working. I will try and do research and do whatever I can. If I don't succeed in getting it to work, would it be ok to attach the database to this thread ask you to have a look and help me get the coding to work properly? I guess wheb you see the db you will have a more clear idea of what I'm trying to do.

Should the field be on every form that I want the tempvars to show though?

Waiting for your reply, thanks.

Ryno
Dec 7 '10 #3
NeoPa
32,556 Expert Mod 16PB
I'm sorry Ryno, but I'm not interested in working that way. I answer clearly-stated question on the forum, and that keeps me quite busy enough thank you.

I expect we would have problems communicating anyway, if the answers I've already given are not enough to get you going. As I already stated, it is critical that you get the design right before you start, or you will waste much time struggling with things that won't work properly.
Dec 7 '10 #4
Well, if I don't succeed is there anybody else that will jelp me that way? This is a question to all the other forum users.

Thank you very much.

Ryno
Dec 7 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Joshua Beall | last post by:
Hi All, What is the best way to use a cookie to remember a logged in user? Would you store the username and password in two separate cookies? Should the password be plain text? Hashed? Not...
12
by: Dave Smithz | last post by:
Hi there, Users of my PHP DB application have complained that it seems to log them out every now and then. I actually assume this is when it has been idle for sometime as I use session variables...
5
by: zz | last post by:
I wrote a .NET windows service,and change the type to Interactive Services. In method OnStart ,I start a .NET application. But after I logout,that application terminates unlike the behavior of...
1
by: Marcin Zmyslowski | last post by:
Hello all! I want to create a page in ASP language which gives me information about currently logged users. I thought to do it by this way: when somebody will log in to page, there will be a...
1
by: anonymous | last post by:
Hi all, I've been searching the way to achieve the following task. But no luck so far. I have a web site(main site), which requires authentication. This authentication is set at Windows...
8
by: Vince Varallo | last post by:
Hello All, I would like to display all logged on users on a web page. I store each user's name in a session varible, but I don't seem to be able to loop through a sessions collection to view...
7
by: John | last post by:
Hi We can get the current logged in user's name but is it also possible to get the default email form outlook of the currently logged-in user as well? The reason for this is that I need to email...
6
by: laredotornado | last post by:
Hi, When a user logs into our site, we create a session variable to denote the session is active and another to denote who is logged in. Once the user closes the browser and re-opens it, the...
7
by: Garry Freemyer | last post by:
I've researched this question on internet, and I've tried a number of things I found to no avail to solve this problem... I work for a company using Visual Studio 2003 to maintain a website for...
11
by: shulace717 | last post by:
Looking for guidance on how to accomplish the following. Default login: User is logged in with a session lifetime of 25 minutes, or until the browser closes: // path for cookies - valid for all...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.