Computer Science Canada

Login script problem

Author:  Thuged_Out_G [ Tue Jan 03, 2006 4:04 pm ]
Post subject:  Login script problem

im using this login script i found on the net for one of my webpages. its in .ASP, i wanted to use PHP but my server doesnt support it.
anyways, my problem is. the login will work and take you into the site, but any link you click on inside the site logs you out .... ill post my login script aswell as the include being used on eachpage

Login Script:
code:

<%@ Language=VBScript %>
<HTML>
<HEAD>
<META name="robots" content="noindex,nofollow">
<BODY><h2><font face="tahoma"><p align="center">Login to the system so that you access the confidential information...</p>
<hr size="2" width="85%"></h2>
<P>
<form action="secured.asp","grids.asp" method="post">
<center>
<table>
<tr>
<td>Username: </td>
<td><input type="text" size="15" name="USERNAME" value="<%= Request("USERNAME")%>"></td>
</tr>
<tr>
<td>Password: </td>
<td><input type="password" size="15" name="PASSWORD"></td>
</tr>
<tr>
</td></td>
<td align="right"><input type="submit" value="Next &gt;"></td>
</tr>
</table>
</center>
</form></font>
<% If Request("failedlogin") = "true" Then %>
<font face="tahoma" color="teal"><h4><P align="center">The username or password you supplied was invalid.</h3></font></P>
<% End If %>
</P>
</BODY>
</HTML>


Check Login:
code:

<%
If (Request("USERNAME") <> "username") Or (Request("PASSWORD") <> "password") Then
Response.Redirect("index.asp?failedlogin=true&USERNAME=" & Request("USERNAME"))
End If
Response.Write Chr(13) ' prints out a carriage return as output in case the page is browsed to directly
%>



any help would be appreciated.

Author:  cool dude [ Tue Jan 03, 2006 6:45 pm ]
Post subject: 

u posted in the wrong section. if u didn't notice this is VB tutorials

Author:  Thuged_Out_G [ Tue Jan 03, 2006 7:24 pm ]
Post subject: 

well, im pretty sure one of the mods can move it.... thanks for your help in pointing out the blatantly obvious though Rolling Eyes


: