|
<! Copy from http://www.15seconds.com/howto/pg000066.htm > <!-- #include file="ccard.inc"--> <html><body> <% number=request("number") cctype=request("cctype") if number<>"" then chk=checkcc(number,cctype) response.write "<br>Result: " select case chk case 0 : response.write "Card is ok!" case 1 : response.write "Wrong card type" case 2 : response.write "Wrong length" case 3 : response.write "Wrong length and card type" case 4 : response.write "Wrong checksum" case 5 : response.write "Wrong checksum and card type" case 6 : response.write "Wrong checksum and length" case 7 : response.write "Wrong checksum, length and card type" case 8 : response.write "unknown cardtype" end select else response.write "Please enter a card number" end if %> <form action=default.asp method=post> Card number: <input type=text name=number value="<%=number%>"><br> Type: <select name=cctype size=8><br> <option value=V <%if cctype="V" then response.write "selected"%>>VISA</option> <option value=M <%if cctype="M" then response.write "selected"%>>Master/Euro</option> <option value=A <%if cctype="A" then response.write "selected"%>>American Exp.</option> <option value=C <%if cctype="C" then response.write "selected"%>>Diners Club</option> <option value=D <%if cctype="D" then response.write "selected"%>>Discover</option> <option value=E <%if cctype="E" then response.write "selected"%>>enRoute</option> <option value=J <%if cctype="J" then response.write "selected"%>>JCB</option> <option value=U <%if cctype="U" then response.write "selected"%>>unknown</option> </select><br><input type=submit value="Test it!" name=B1> </form> <b>Create: 1998 by <a href="http://www.click-online.de">Click Online</a> </body></html> |