tgl@bug
03-30-2005, 10:51 PM
i had required user to enter related information to make their payment in payment.asp.then only i checked the information in check.asp. im using ODBC method to link to database.Somehow, these 2 pages can run correctly before,but after changing the interface,the check.asp couldn't run correctly as it should be...
here is the check.asp code:
'capture those information
bank = request.form("institute")
.
.
'validate it
if bank = "" then
errmsg = "please select your bank type"
elseif type = "" then
errmsg = "please select your card type"
elseif cardno = "" then
errmsg = "please enter your credit card number"
elseif not isNumeric(cardno) then
errmsg = "Credit card number only allowed numeric"
elseif password = "" then
errmsg = "please enter your password"
End if
'set the connection
---------------
sql = "select * from password where institute = "&bank&'" And CardType = "&type
if password <> rs("Password") then
errmsg = "this is not a valid password"
end if
if errmsg = "" then
%>
<html>
<body>
you have successfully made the payment!
</body>
</html>
<%
elseif
%>
<html>
<body>
<form method = "post" action = "payment.asp">
there is some problem with your information
<blockquote><%=errmsg%></blockquote>
<input type = "hidden" name = "bank" value = "<%=bank%>">
<input type = "hidden" name = "type" value = "<%=type%>">
<input type = "hidden" name = "cardno" value = "<%=cardno%>">
<input type = "hidden" name = "password" value = "<%=password%>">
<input type = "Submit" name = "submit" value = "return">
</form></body></html>
<%
End If
%>
the problem is everytime i load this page,it must contain information for "cardno" before its checking.if user didn't enter that information,the page can not open.
but before i change the interface,everything jz fine in running the program.
Thank for those kindly reply..
here is the check.asp code:
'capture those information
bank = request.form("institute")
.
.
'validate it
if bank = "" then
errmsg = "please select your bank type"
elseif type = "" then
errmsg = "please select your card type"
elseif cardno = "" then
errmsg = "please enter your credit card number"
elseif not isNumeric(cardno) then
errmsg = "Credit card number only allowed numeric"
elseif password = "" then
errmsg = "please enter your password"
End if
'set the connection
---------------
sql = "select * from password where institute = "&bank&'" And CardType = "&type
if password <> rs("Password") then
errmsg = "this is not a valid password"
end if
if errmsg = "" then
%>
<html>
<body>
you have successfully made the payment!
</body>
</html>
<%
elseif
%>
<html>
<body>
<form method = "post" action = "payment.asp">
there is some problem with your information
<blockquote><%=errmsg%></blockquote>
<input type = "hidden" name = "bank" value = "<%=bank%>">
<input type = "hidden" name = "type" value = "<%=type%>">
<input type = "hidden" name = "cardno" value = "<%=cardno%>">
<input type = "hidden" name = "password" value = "<%=password%>">
<input type = "Submit" name = "submit" value = "return">
</form></body></html>
<%
End If
%>
the problem is everytime i load this page,it must contain information for "cardno" before its checking.if user didn't enter that information,the page can not open.
but before i change the interface,everything jz fine in running the program.
Thank for those kindly reply..