I have the following code in an include file to check if the user logged in or not. For some reason, whenever a page requires session variables being set in an onClick event, this code kills them, and they don't show up on the next page.
Does anyone know why and what I can do so I can have this code and my session variables too?! (some cake would be nice too)
<%
if session("CandID" <> "" then
dim helloString
helloString = "Hello " & session("CandID" & "!"
helloString = helloString & "If you are not " & session("CandID" & "please "
helloString = helloString & "<a href='default.shtml'>log in.</a>"
Response.Write helloString
else
%>
<h3>Already a member? <br>Login now.</h3>
<form action="validatePassword.asp" method="get" name="frmLogin">
<table>
<tr>
<td>Username: </td></tr>
<tr>
<td><input id="text1" name="txtUserName"></td></tr>
<tr>
<td>Password: </td></tr>
<tr>
<td><input type="password" id="password1" name="txtPassword"></td></tr>
</table>
<input type="image" src="images/img_Submit.gif" value="Submit" id="submit1" name="btnSubmit" WIDTH="106" HEIGHT="54">
</form>
<h3>New User? <a href="profile.shtml">Click Here</a> </h3>
<%
end if
%>
Does anyone know why and what I can do so I can have this code and my session variables too?! (some cake would be nice too)
<%
if session("CandID" <> "" then
dim helloString
helloString = "Hello " & session("CandID" & "!"
helloString = helloString & "If you are not " & session("CandID" & "please "
helloString = helloString & "<a href='default.shtml'>log in.</a>"
Response.Write helloString
else
%>
<h3>Already a member? <br>Login now.</h3>
<form action="validatePassword.asp" method="get" name="frmLogin">
<table>
<tr>
<td>Username: </td></tr>
<tr>
<td><input id="text1" name="txtUserName"></td></tr>
<tr>
<td>Password: </td></tr>
<tr>
<td><input type="password" id="password1" name="txtPassword"></td></tr>
</table>
<input type="image" src="images/img_Submit.gif" value="Submit" id="submit1" name="btnSubmit" WIDTH="106" HEIGHT="54">
</form>
<h3>New User? <a href="profile.shtml">Click Here</a> </h3>
<%
end if
%>