Please support our Database Design advertiser: Programming Forums
![]() |
•
•
Join Date: Aug 2007
Posts: 98
Reputation:
Rep Power: 2
Solved Threads: 0
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!
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!
•
•
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,502
Reputation:
Rep Power: 5
Solved Threads: 91
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
If the sample query returns 1 then login else display a message like invalid username or password.
To check for existance try to follow the sample SQL
oracle Syntax (Toggle Plain Text)
SELECT COUNT(*) FROM USER_TABLE_NAME WHERE USERNAME='DEBASIS' AND PASSWORD='DEBASIS'
Last edited by debasisdas : Oct 23rd, 2007 at 11:26 am.
Share your Knowledge.
•
•
Join Date: Aug 2007
Posts: 98
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
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.
•
•
Join Date: Jan 2006
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
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.
![]() |
Similar Threads
Other Threads in the Database Design Forum
- Updated : Simple ASP.Net Login Page (ASP.NET)
- database driven login page (ASP.NET)
- web based datbase question about email (Database Design)
- web based database question (IT Professionals' Lounge)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
Other Threads in the Database Design Forum
- Previous Thread: Help in normalising please!!!
- Next Thread: Database Design Question
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode