User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 456,533 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,886 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser: Programming Forums
Views: 2270 | Replies: 5
Reply
Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

Web based database login page question

  #1  
Oct 8th, 2007
Hi Guys,

I am developing a Web based database for a company for my year work placement for university. As I am still a student I am still learning and finding this difficult.

I am looking at designing a login page using ASP, the code I have is:-

<%= sErrorMessage %></font>
<form action="login.asp" method="post" name="formlogin" id="formlogin">
<table width="528" height="136" border="1">
<tr>
<td width="153">username</td>
<td width="359"><input name="txtusername" type="text" id="txtusername" size="50"></td>
</tr>
<tr>
<td>password</td>
<td><input name="txtpassword" type="password" id="txtpassword" size="20"></td>
</tr>
<tr>
<td>click button to login </td>
<td><input name="btnlogin" type="submit" id="btnlogin" value="login"></td>
</tr>
</table>
</form>


I realise that this code is for inputting the username and password but, how would I go about enabling the page to recognise the username and password as correct then to login and how would I do this with a number of different user names?

And suggestions would be appreciated.
Thanks!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 252
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 14
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: Web based database login page question

  #2  
Oct 17th, 2007
post the datas to login.asp again
use get method to catch the posted infos. then
then connect ur database and
use while methoe with eof... if the entered values are the same end while circle and redirect the page where you want. you can find these login page everywhere.
Do a favour, leave me alone
Reply With Quote  
Join Date: Jan 2006
Posts: 5
Reputation: malik is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
malik malik is offline Offline
Newbie Poster

Re: Web based database login page question

  #3  
Oct 18th, 2007
Just allowing users after confirming from database is not enough. The other thing that you must keep in mind is that you have to track the users with the help of Session ID.
If you need more info on that, do let us know.
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,445
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 87
debasisdas's Avatar
debasisdas debasisdas is online now Online
Nearly a Posting Virtuoso

Re: Web based database login page question

  #4  
Oct 23rd, 2007
The logic is so simple .This can be implemented at the database level it self by using SQL statments. When the user tries to login check for existance of such an user with the corresponding password . If the user exists then go further.

To check for existance try to follow the sample SQL
  1. SELECT COUNT(*) FROM USER_TABLE_NAME WHERE USERNAME='DEBASIS' AND PASSWORD='DEBASIS'
If the sample query returns 1 then login else display a message like invalid username or password.
Last edited by debasisdas : Oct 23rd, 2007 at 11:26 am.
Share your Knowledge.
Reply With Quote  
Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

Re: Web based database login page question

  #5  
Oct 24th, 2007
Originally Posted by malik View Post
Just allowing users after confirming from database is not enough. The other thing that you must keep in mind is that you have to track the users with the help of Session ID.
If you need more info on that, do let us know.



yeah, I know what a Session ID is but how would I need this or go about using it?

sorry if I am asking really simple questions but... best way i can learn.
Reply With Quote  
Join Date: Jan 2006
Posts: 5
Reputation: malik is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
malik malik is offline Offline
Newbie Poster

Re: Web based database login page question

  #6  
Oct 24th, 2007
Originally Posted by GLT View Post
yeah, I know what a Session ID is but how would I need this or go about using it?

sorry if I am asking really simple questions but... best way i can learn.


no need to sorry. this is how i learn things.
well, you know that every time explorer access a server, a session ID is generated. This session ID is used to track the authenticity of the users as he moves to other pages of the site. If this is not done, then one can access the page just by copying and pasting the URL of web pages other than the main page where login is required (try this out for your application).
now the question is how to do it?
there are a numbers of ways of doing it. one can store the Session ID is a hidden field and pass it to the web pages as the users moves.
you can find implementation details through "Google" as I done this a very long time ago.
if need help, do let us know.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Database Design Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Database Design Forum

All times are GMT -4. The time now is 4:36 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC