ASP Source Code ASP File: withdraw.asp |
|
<HTML>
<BODY>
<%
dim accountmanager
dim account
dim name
dim password
dim withdraw
name =Request("name")
password=Request("password")
withdraw=Request("dollar")
set accountmanager =server.createobject("BankManager")
set account =accountmanager.open(CStr(name),CStr(password))
if account is nothing then
response.write("Password or user name error, Please try back
before and try again")
else
if Withdraw <> "" then
a = account.withdraw(cdbl(Withdraw))
else
response.write("No dollar is to withdraw")
end if
if a=-1.0 then
response.write("This is more than the current balance
of $" & account.balance())
else
response.write("Withdraw successfully,now the current
balance is $" & account.balance())
end if
end if
%>
</BODY>
</HTML>