473,699 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP Code needs help! ! !

3 New Member
Hi guys, i need help with the following code. It didnot give me any error, but it just doesnot go to the verify function.Since i am a newbie, i need help with it.


*************** *************** *************** MessageBoard.as p************** ***********
<% @Language=VBScr ipt %>
<% Option Explicit %>


<body bgcolor="#6666C C">
<%
dim strThisPage
strThisPage = "MessageBoard.a sp"
%>

<form action="<%=strT hisPage%>?actio n=verify" method="post">< br>
Your Topic:<br>
<input type="text" SIZE="75" name="topic">
<BR>
<br />

Name:&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;Pas sword:<br />

<input type="name" name="username" />

<input type="password" name="password" />
<br />
<br />




Your Message: <br>
<TEXTAREA name="message" rows=20 cols=60></TEXTAREA>
<br>
<input type="reset" name="rest" value="Reset" />
<input type="submit" name="post" value="Post"/>
</form>




<%
Sub verify()
%>
<!--#include file="connectio n.asp"-->


<%
Dim username, password, foundIt, RS

username=trim(r equest.form("us ername"))
password=trim(r equest.form("pa ssword"))

If username = "" or password = "" then
response.redire ct ("login.asp?err or=3")
End If

Set RS = Server.CreateOb ject("ADODB.Rec ordset")
RS.Open "Login", objConn

foundIt=False
Do Until RS.EOF OR foundIt
If (StrComp(RS("us ername"), username, vbTextCompare) = 0) Then
foundIt=True
Else
RS.MoveNext
End If
Loop

If Not foundIt Then
RS.Close
Set RS = Nothing
objConn.Close
Set objConn = Nothing
response.redire ct("login.asp?e rror=1")
End If

If Not (StrComp(RS("pa ssword"), password, vbBinaryCompare ) = 0) Then
RS.Close
Set RS = Nothing
objConn.Close
Set objConn = Nothing
Response.Redire ct("login.asp?e rror=2")

Else Session("Valid" ) = Request("userna me")
Response.Redire ct("newphoto.as p")
End If
end sub
%>
*************** *************** ***********conn ection.asp***** *************** *********

<%
Dim objConn
Set objConn = Server.CreateOb ject("ADODB.Con nection")
objConn.Connect ionString="DRIV ER={Microsoft Access Driver (*.mdb)};" & "DBQ=C:\Inetpub \wwwroot\FanWeb \ADO\Fan\DataBa se\mydb.mdb"
objConn.open
%>
*************** *************** *************** *************** *************** *************** *
Feb 20 '07 #1
2 1824
LogitechCam
3 New Member
Hi guys, i need help with the following code. It didnot give me any error, but it just doesnot go to the verify function.Since i am a newbie, i need help with it.


*************** *************** *************** MessageBoard.as p************** ***********
<% @Language=VBScr ipt %>
<% Option Explicit %>


<body bgcolor="#6666C C">
<%
dim strThisPage
strThisPage = "MessageBoard.a sp"
%>

<form action="<%=strT hisPage%>?actio n=verify" method="post">< br>
Your Topic:<br>
<input type="text" SIZE="75" name="topic">
<BR>
<br />

Name:&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p;&nbsp;&nbsp;& nbsp;&nbsp;&nbs p; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;Pas sword:<br />

<input type="name" name="username" />

<input type="password" name="password" />
<br />
<br />




Your Message: <br>
<TEXTAREA name="message" rows=20 cols=60></TEXTAREA>
<br>
<input type="reset" name="rest" value="Reset" />
<input type="submit" name="post" value="Post"/>
</form>




<%
Sub verify()
%>
<!--#include file="connectio n.asp"-->


<%
Dim username, password, foundIt, RS

username=trim(r equest.form("us ername"))
password=trim(r equest.form("pa ssword"))

If username = "" or password = "" then
response.redire ct ("login.asp?err or=3")
End If

Set RS = Server.CreateOb ject("ADODB.Rec ordset")
RS.Open "Login", objConn

foundIt=False
Do Until RS.EOF OR foundIt
If (StrComp(RS("us ername"), username, vbTextCompare) = 0) Then
foundIt=True
Else
RS.MoveNext
End If
Loop

If Not foundIt Then
RS.Close
Set RS = Nothing
objConn.Close
Set objConn = Nothing
response.redire ct("login.asp?e rror=1")
End If

If Not (StrComp(RS("pa ssword"), password, vbBinaryCompare ) = 0) Then
RS.Close
Set RS = Nothing
objConn.Close
Set objConn = Nothing
Response.Redire ct("login.asp?e rror=2")

Else Session("Valid" ) = Request("userna me")
Response.Redire ct("newphoto.as p")
End If
end sub
%>
*************** *************** ***********conn ection.asp***** *************** *********

<%
Dim objConn
Set objConn = Server.CreateOb ject("ADODB.Con nection")
objConn.Connect ionString="DRIV ER={Microsoft Access Driver (*.mdb)};" & "DBQ=C:\Inetpub \wwwroot\FanWeb \ADO\Fan\DataBa se\mydb.mdb"
objConn.open
%>
*************** *************** *************** *************** *************** *************** *
please help me
Feb 20 '07 #2
LogitechCam
3 New Member
Solved!@.@
Feb 20 '07 #3

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

Similar topics

5
3127
by: Darren Grant | last post by:
Hi there, I've attempted to implement an Angle class. An Angle is a subset of an integer, where the range is [0,360). All other operations should be permitted. The code works, I think... except (for example) a = b + 10; needs to be a = b + (Angle) 10; Could some kind soul comment on my code and show me how it could be
15
6059
by: Dan M | last post by:
Can anyone help me with this code? This is the section and it comes up with a warning C4518: 'int' : storage-class or type specifier(s) unexpected here; ignored on line 3 int replace (char *string) int i= 0; int total= 0;
65
12580
by: Skybuck Flying | last post by:
Hi, I needed a method to determine if a point was on a line segment in 2D. So I googled for some help and so far I have evaluated two methods. The first method was only a formula, the second method was a piece of C code which turned out to be incorrect and incomplete but by modifieing it would still be usuable. The first method was this piece of text:
4
1248
by: ITnerd | last post by:
In the interest of code re-use, I would like to place some code in a utility class to be used by other classes. The problem is that this code requires the following snippet: for(i=0; i < tbl.Rows.Count; i++) { myDataRow = tbl.Rows; company.someNestedClass sc = new company.someNestedClass(); for(j=0; j < tbl.Columns.Count; j++) {
88
8042
by: Peter Olcott | last post by:
Cab you write code directly in the Common Intermediate language? I need to optimize a critical real-time function.
15
4607
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to communicate with a MySQL database table on a web server, from inside of my company's Access-VBA application. I know VBA pretty well but have never before needed to do this HTTP/XML/MySQL type functions.
16
2805
by: Rex | last post by:
Hi All - I have a question that I think MIGHT be of interest to a number of us developers. I am somewhat new to VIsual Studio 2005 but not new to VB. I am looking for ideas about quick and efficient navigating within Visual Studio 2005. Let's say your project (or solution) has dozens of forms and hundreds or even thousands of routines. Two Questions: 1) BUILT-IN to Visual Studio 2005. What ideas do you have to quickly
5
4097
by: rdemyan via AccessMonster.com | last post by:
I have a need to add another field to all of my tables (over 150). Not data, but an actual field. Can I code this somehow. So the code presumabley would loop through all the tables, open each table in design mode and then add the new field and set its properties. Thanks. --
1
1259
Chrisjc
by: Chrisjc | last post by:
I am hoping someone can help me out here. I am trying to make one drop down box pull from a database the DB name is “dealerlocater” the column it needs to pull in this drop down is called “state” Once it loads all the states in the drop down box it then needs to be able to do the following. Once a user selects a state it will load all information listed in the ROWS of the state column I.E. ++++++++++++++++ + Select Your State + Pulls...
11
1294
by: Daniel Norden | last post by:
Hello. Can you give me some feedback on my code layout? I have everything organized in an object, "NRL", that's used as a namespace, and there are other subobjects/modules below that, for example "dialog" or "ajax". I'm interested in general comments, and I have some specific questions, but first the (sample) code: var NRL = {};
0
9178
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8916
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7752
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6534
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5875
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4376
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3058
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 we have to send another system
2
2348
muto222
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.