•
•
•
•
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
![]() |
•
•
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,445
Reputation:
Rep Power: 4
Solved Threads: 87
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.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Database Design Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
advertising blog breach browser browsers browsing community daniweb data database design development devices domains firefox google hacker india internet java legal linux marketing merger microsoft mobile applications mozilla msn multimedia news php privacy report research search security software sql sun survey users video w3c web web development wikipedia xml yahoo youtube
- 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 (Web Developers' 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



Linear Mode