473,386 Members | 1,720 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,386 software developers and data experts.

How to abandon previous session of the same user?

16
Hi,

I 'm working on a web application. suppose user 'A' login from machine 'X'. If the same user tries to login from another machine, he should automatically signout from mechine'X'. In short i want to avoid multiple login. Pls Help me!!!. Thanks in advance

Anoop S.
Jul 26 '11 #1
3 2348
Frinavale
9,735 Expert Mod 8TB
Before we can help you, please let us know about what form of authentication you're using :)

It shouldn't be too hard to check the database for a field that indicates something about the computer the currently logged in user is using... Just compare it to something set in a cookie to determine whether or not the log-in is still valid.

-Frinny
Jul 27 '11 #2
anoop s
16
Thanks for immediate response, I am using form authentication.
Jul 29 '11 #3
kadghar
1,295 Expert 1GB
If you want to keep an IP log, just make a table with USER and IP columns that keeps track of the current IP of the user. For easier, generate a session variable with a GUID and write it in your database.
Aug 13 '11 #4

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

Similar topics

5
by: vincent | last post by:
Hi, If i login to the site again (may be in the same pc or different pc), system must allow me in and end my previous session. How do i go about doing this? This is to ensure that an user...
5
by: tshad | last post by:
If I am using FormsAuthentication, is there a way to check who is logged in? I want to be able to check at any particular time, not just how many people are logged in, but who they are. One...
2
by: Fabrice | last post by:
Hello, I 'would like to build a system (based on database, not SqlServer but MySQL) to permit only one session per user. I'm using a form athentication. My Solution : --------------- When...
3
by: JJ_377 | last post by:
What is the difference between Session.Abandon and Session.Clear? Thank you.
0
by: 'Mani | last post by:
Hi All, I need to abandon a different session and want to know how to do this. Session.Abandon() will abndon only the current session associated with the current request. But, my necessity is...
2
by: mharness | last post by:
Hello, I'm working on an approach to systematically and automatically log users on and off an app that precludes users from sharing usernames and passwords. I have most of that working except...
0
by: gomzi | last post by:
Hi, I am currently forced to use no-cache in my pages so that the session gets cleared properly. In-case I remove the no-cache piece of code from my pages, the user will be able to visit the...
2
by: =?Utf-8?B?bXVzY2xla2luZw==?= | last post by:
say i have a form with many input text boxes, what is the proper way to store these values so when the next time the user opens the form, all the input from last session remains in the form? people...
2
by: phpuser123 | last post by:
I have as my script the following.. <?php session_start();?> <html> <body>I am<?php function setanimal(){echo (isset( $_SESSION)); if (isset( $_SESSION)){ return ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.