473,473 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

VB ASP form

35 New Member
Hey,

I have been working on creating a basic login for a website now for 2 days and still have gotten no further.

So far I think the form is correct, it has to fields a username and a password field, this then gets submitted to the check.asp via the post method then the vb script is meant to link to the sql database and validate if the login information is present in the database. If it is redirect to welcome.asp, else goto login.asp

Here's what I have so far

login.asp

Expand|Select|Wrap|Line Numbers
  1.  
  2. <html>
  3. <head>
  4. <title>login</title>
  5. </head>
  6.  
  7. <body>
  8. <form action="check.asp" method="post" name="login">
  9.     <table>
  10.     <tr>
  11.     <td><span class="style14">Username:</span> </td>
  12.     <td><input name="username" type="text" size="30" maxlength="25" /></td>
  13.     </tr>
  14.     <tr>
  15.     <td><span class="style14">Password:</span></td>
  16.     <td><input name="password" type="password" size="30" maxlength="25" /></td>
  17.     </tr>
  18.     <tr>
  19.     <td><div align="left"><a href="register.asp" class="style13">Sign up....  </a></div></td>
  20.     <td align=right><input type="image" src="submit.jpg" alt="loginsubmit"/></td>
  21.     </tr>
  22.     </table>   
  23.     </form>
  24. </body>
  25. </html>
  26.  
check.asp

Expand|Select|Wrap|Line Numbers
  1.  
  2. <%
  3. '#Connect to SQL database#'
  4. Dim objConn
  5. Set objConn = Server.CreateObject("ADODB.Connection")
  6. objConn.Open "dsn=Oracle;uid=username;pwd=password;"
  7. %>
  8.  
  9. <%
  10. intUserid = Request.form("intUserid")
  11. txtUserpwd = Request.form("txtUserpwd")
  12. %>
  13. <%
  14. strSQL = "SELECT * FROM tblUser WHERE intUserid = '"&intUserid&"' AND txtUserpwd = '"&txtUserpwd&"'"
  15.  
  16. Set objRs = objConn.execute(strSQL)
  17.  
  18. If (objRs.BOF) then 
  19. Response.Redirect "login.asp?fail try again"
  20. Else 
  21. Response.Cookies("login")("intUserid") = intUserid
  22. Response.Cookies("login").Expires = Date + 1
  23. Response.Redirect "welcome.asp"
  24.  
  25. End If
  26. %>
  27.  
Any ideas guys?
Jan 22 '08 #1
3 1076
daniel aristidou
491 Contributor
Hey,

I have been working on creating a basic login for a website now for 2 days and still have gotten no further.

So far I think the form is correct, it has to fields a username and a password field, this then gets submitted to the check.asp via the post method then the vb script is meant to link to the sql database and validate if the login information is present in the database. If it is redirect to welcome.asp, else goto login.asp

Here's what I have so far

Any ideas guys?
What exactly do you want help with?
Jan 31 '08 #2
j0rdanf1
35 New Member
What exactly do you want help with?
its ok came up with a solution, cheers though
Jan 31 '08 #3
red3recon
1 New Member
its ok came up with a solution, cheers though
What was your solution?
Feb 8 '08 #4

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

Similar topics

3
by: John | last post by:
Dear all, It been more than 3 days I am trying to debug this program, I interpret it using activePerl and it is giving (perl -wc code_process.pl) no error syntax but when I put it online, change...
5
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the...
4
by: Targa | last post by:
Trying to total some price fields in a form but doesnt work when all the referenced form fields dont exisit. This is for an invoice - pulled prom a database and the form doesnt always contain the...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
19
by: Raposa Velha | last post by:
Hello to all! Does any of you want to comment the approach I implement for instantiating a form? A description and an example follow. Cheers, RV jmclopesAThotmail.com replace the AT with the...
11
by: Jozef | last post by:
I have some old code that I use from the Access 95 Developers handbook. The code works very well, with the exception that it doesn't seem to recognize wide screens, and sizes tab controls so that...
5
by: RAJ | last post by:
hi plz tell me how to know "how window is going to close"... i have to right code for X button of forms... plz telll me thanks bye
6
by: Gary Miller | last post by:
Does anyone know how to detect a modeless form on closing by the form that invoked the modeless form? form.Show();
4
by: Alex Sibilev | last post by:
Hello, I have a really weird problem I've been trying to solve it without any luck for the last couple of hours :( I'm writing a "conference board" application (quite similar to ASP.NET...
5
by: ortaias | last post by:
I have a form which calls up a second form for purposes of data entry. When closing the data entry form and returning to the main form, things don't work as expected. When I return to the main...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.