bgreenhouse
Technical User
Hi again...
I'm having a strange problem...I am writing a login/pw validate script. I have written one before, and it worked fine. All of a sudden though, I'm having problems with data type mismatches. I have checked everything, tried using cStr functions etc...nothing works. So I just wanted to see what type of variable was coming in from my imput form. I wrote the following .asp:
<%@ LANGUAGE="VBSCRIPT" %>
<% Dim Prefix, Crdnum, strPIN
Prefix = "12345678901"
Crdnum = Request.form("Cardnum"
Crdnum = Prefix&Crdnum
strPIN = Request.form("PIN"
%>
<html>
<head>
</head>
<body>
Hi <%=CrdNum%>! Your PIN is <%=strPIN%>
<SCRIPT LANGUAGE = "vbscript">
<!--
Alert "CrdNum is a type " & VarType(CrdNum) & " Variant and strPIN is a type " & VarType(strPIN) & "Variant."
-->
</SCRIPT>
</body>
</html>
It displays the variables when prompted to do so in the HTML document, but when it alerts me of the VarType, both are "0", meaning empty. But it just put the variables on the web page, so obviously they're not empty! Any ideas as to what's going on?
Ben
I'm having a strange problem...I am writing a login/pw validate script. I have written one before, and it worked fine. All of a sudden though, I'm having problems with data type mismatches. I have checked everything, tried using cStr functions etc...nothing works. So I just wanted to see what type of variable was coming in from my imput form. I wrote the following .asp:
<%@ LANGUAGE="VBSCRIPT" %>
<% Dim Prefix, Crdnum, strPIN
Prefix = "12345678901"
Crdnum = Request.form("Cardnum"
Crdnum = Prefix&Crdnum
strPIN = Request.form("PIN"
%>
<html>
<head>
</head>
<body>
Hi <%=CrdNum%>! Your PIN is <%=strPIN%>
<SCRIPT LANGUAGE = "vbscript">
<!--
Alert "CrdNum is a type " & VarType(CrdNum) & " Variant and strPIN is a type " & VarType(strPIN) & "Variant."
-->
</SCRIPT>
</body>
</html>
It displays the variables when prompted to do so in the HTML document, but when it alerts me of the VarType, both are "0", meaning empty. But it just put the variables on the web page, so obviously they're not empty! Any ideas as to what's going on?
Ben