lovesirius12
08-16-2005, 03:16 AM
I really dont know what's the problem here, please help me... here's the code
<%
dim clientcode, username, password, password2, pass
clientcode=trim(request.form("clientcode"))
username=trim(request.form("username"))
password=trim(request.form("password"))
password2=trim(request.form("password2"))
if clientcode<>"" then
if username<>"" then
if password<>"" then
if password2<>"" then
if password=password2 then
set cone=server.createobject("adodb.connection")
sConnString = "PROVIDER=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("purchase.mdb")
cone.open sConnString
set vanny=server.createobject("adodb.recordset")
sql="select * from purchase where username ='" & username & "' and clientcode=" & clientcode
vanny.open sql, cone
if vanny.eof then
response.write "<center>" &"<font color=red>" &"<b>" &"Client Code and User Name doesn't
exist." &"</b>" &"</font>" &"</center><br>"
response.write "<center>" &"<font color=red>" &"<b>" &"Please make sure you enter the
correct information" &"</b>" &"</font>" &"</center>"
else
pass = vanny.fields("password")
if pass = password then
vanny.close
cone.close
response.redirect("http://localhost/blueskies/orderform.asp")
else
response.write "<center>" &"<font color=red>" &"<b>" &"Incorrect password..."&"</
b>" &"</font>" &"</center>"
end if
end if
else
response.write "<center>" &"<font color=red>" &"<b>" &"Password mismatch..."&"</b>" &"</
font>" &"</center>"
end if
else
response.write "<center>" &"<font color=red>" &"<b>" &"Please retype your Password"&"</b>" &"</
font>" &"</center>"
end if
else
response.write "<center>" &"<font color=red>" &"<b>" &"Please provide your Password"&"</b>" &"</font>" &"
</center>"
end if
else
response.write "<center>" &"<font color=red>" &"<b>" &"Please provide your User Name"&"</b>" &"</font>" &"</
center>"
end if
else
response.write "<center>" &"<font color=red>" &"<b>" &"Please provide your Client Code"&"</b>" &"</font>" &"</center>"
end if
vanny.close <----------the error points here
cone.close
%>
<%
dim clientcode, username, password, password2, pass
clientcode=trim(request.form("clientcode"))
username=trim(request.form("username"))
password=trim(request.form("password"))
password2=trim(request.form("password2"))
if clientcode<>"" then
if username<>"" then
if password<>"" then
if password2<>"" then
if password=password2 then
set cone=server.createobject("adodb.connection")
sConnString = "PROVIDER=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("purchase.mdb")
cone.open sConnString
set vanny=server.createobject("adodb.recordset")
sql="select * from purchase where username ='" & username & "' and clientcode=" & clientcode
vanny.open sql, cone
if vanny.eof then
response.write "<center>" &"<font color=red>" &"<b>" &"Client Code and User Name doesn't
exist." &"</b>" &"</font>" &"</center><br>"
response.write "<center>" &"<font color=red>" &"<b>" &"Please make sure you enter the
correct information" &"</b>" &"</font>" &"</center>"
else
pass = vanny.fields("password")
if pass = password then
vanny.close
cone.close
response.redirect("http://localhost/blueskies/orderform.asp")
else
response.write "<center>" &"<font color=red>" &"<b>" &"Incorrect password..."&"</
b>" &"</font>" &"</center>"
end if
end if
else
response.write "<center>" &"<font color=red>" &"<b>" &"Password mismatch..."&"</b>" &"</
font>" &"</center>"
end if
else
response.write "<center>" &"<font color=red>" &"<b>" &"Please retype your Password"&"</b>" &"</
font>" &"</center>"
end if
else
response.write "<center>" &"<font color=red>" &"<b>" &"Please provide your Password"&"</b>" &"</font>" &"
</center>"
end if
else
response.write "<center>" &"<font color=red>" &"<b>" &"Please provide your User Name"&"</b>" &"</font>" &"</
center>"
end if
else
response.write "<center>" &"<font color=red>" &"<b>" &"Please provide your Client Code"&"</b>" &"</font>" &"</center>"
end if
vanny.close <----------the error points here
cone.close
%>