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

Problem with Login check from SQL DB

Hi, i have a project which is hospital automation software. I need to set a login screen for users to access different forms according to their access rights. I have a table in my sql database(sql server 2008) with user records, each user has an id no and password in table. I created a login form with id and pass textboxes in it but i dont know how to compare them from database and complete the login action. How can i do that?
Jan 3 '10 #1

✓ answered by ThatThatGuy

pass a query to the database something like this...

select Count(*) from Users where id like 'userid' and password like 'pass'

and if 1 is returned then the user credentials are valid

2 2286
ThatThatGuy
449 Expert 256MB
pass a query to the database something like this...

select Count(*) from Users where id like 'userid' and password like 'pass'

and if 1 is returned then the user credentials are valid
Jan 4 '10 #2
thank you thatthatguy it worked ;)
Jan 4 '10 #3

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

Similar topics

1
by: Nick Whitelegg | last post by:
Hello, I'm having an odd problem with combining an authentication session variable with header() redirection. Basically I have an authentication script which checks a username/password. If the...
7
by: Dan | last post by:
I was trying to troubleshoot a login page that doesn't work - it keeps saying the login/password is missing - when my tracing discovered this peculiar behavior. register_globals is off, so at...
9
by: Bartosz Wegrzyn | last post by:
I need help with sessions. I createt set of web site for nav with authorization. first I go into main.php which looks like this: <?php //common functions include_once '../login/common.php';...
2
by: Netanel | last post by:
Hi, I have a site that I developed in ASP / VBScript. Some of the visitors are complaining that they can't get in into the system (using the login form of-course). My login form includes...
3
by: gtea | last post by:
I am using response.redirec to do the url redirection on my login page. The login page is under http://myURL/test/dir1/login.aspx, when the user login successfully, the login page redirects the...
11
by: ElmoWatson | last post by:
I tried on the Security newgroup, as well as other places, and haven't gotten an answer yet - - I'm pulling my hair out over this one. I'm trying to get Forms Authentication working.....I can get...
5
by: Uzi Baruch | last post by:
Hi! Is there an embedded way to check if a session ends? i have an standard ASP.NET application and i want to check if the session has expired on every "Click" that the user did, and...
2
by: MS News Public | last post by:
Hi I have an asp.net 2.0 project and am experiencing a problem. In the project, I am trying to make use of Membership. I have one Role, called "Basic User" and two users - "admin" and...
1
by: quill | last post by:
Hi I am making a chatroom script and it appears that the problem seems to be that my setTimeout's are conflicting. The logic is as follows: Run a login check every x seconds Run a trigger...
2
by: sheaguevara | last post by:
This is my first post onto the forum. So first off, I'd like to say hello to everyone. I just started working on a login/registration system and I am trying to have a feature where the user will...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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:
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
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.