Web based database login page question

Reply

Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

Web based database login page question

 
0
  #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!
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 271
Reputation: fatihpiristine has a little shameless behaviour in the past 
Solved Threads: 16
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: Web based database login page question

 
0
  #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 Quick reply to this message  
Join Date: Jan 2006
Posts: 5
Reputation: malik is an unknown quantity at this point 
Solved Threads: 0
malik malik is offline Offline
Newbie Poster

Re: Web based database login page question

 
0
  #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 Quick reply to this message  
Join Date: Feb 2007
Posts: 2,086
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 125
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: Web based database login page question

 
0
  #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 Quick reply to this message  
Join Date: Aug 2007
Posts: 98
Reputation: GLT is an unknown quantity at this point 
Solved Threads: 0
GLT GLT is offline Offline
Junior Poster in Training

Re: Web based database login page question

 
0
  #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 Quick reply to this message  
Join Date: Jan 2006
Posts: 5
Reputation: malik is an unknown quantity at this point 
Solved Threads: 0
malik malik is offline Offline
Newbie Poster

Re: Web based database login page question

 
0
  #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 Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Database Design Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC